habitica-android/Habitica/res/layout/activity_group_form.xml
Hafiz bff05301f4 Limits height of party description input
Sets a maximum height for the group description edit text field.

This prevents the text input from expanding indefinitely and
occupying too much screen space when users enter long descriptions.
2025-06-06 13:48:47 +02:00

131 lines
No EOL
6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/cancel_button"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/ic_close_white_24dp"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:contentDescription="@string/cancel"
app:tint="?colorPrimary" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:id="@+id/save_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/create"
style="@style/HabiticaButton.Borderless"
android:textColor="?colorPrimary"
android:paddingEnd="@dimen/spacing_large"
android:paddingStart="@dimen/spacing_large"
android:minWidth="20dp"/>
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintTextAppearance="@style/TextAppearance.AppCompat"
android:layout_marginTop="@dimen/spacing_small"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"
android:hint="@string/name"
android:textColorHint="@color/text_primary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/group_name_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:inputType="textCapSentences"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
android:textColorHint="@color/text_secondary"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintTextAppearance="@style/TextAppearance.AppCompat"
android:layout_marginTop="@dimen/spacing_large"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"
android:hint="@string/description"
android:textColorHint="@color/text_primary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/group_description_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="250dp"
android:layout_gravity="center_horizontal"
android:inputType="textCapSentences|textMultiLine"
android:textColorHint="@color/text_primary"
android:gravity="top"
android:minLines="3"
android:scrollbars="vertical"/>
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_large"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large">
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/only_leader_create_challenge"/>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/leader_create_challenge_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<View
android:id="@+id/privacy_separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#1e000000"
android:layout_marginTop="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
tools:visibility="gone" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/privacyWrapper"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"
tools:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/privacy"
android:layout_gravity="center_vertical" />
<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/privacySpinner" />
</LinearLayout>
</LinearLayout>
</FrameLayout>