Fix behavior of the feed group dialog under some screen sizes/scales
This commit is contained in:
parent
d1d5f6821f
commit
34082c40d3
1 changed files with 122 additions and 120 deletions
|
@ -6,142 +6,144 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<FrameLayout
|
||||||
android:id="@+id/options_root"
|
android:id="@+id/panels_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_gravity="center"
|
android:layout_weight="1">
|
||||||
android:layout_weight="1"
|
|
||||||
android:minHeight="150dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<ImageButton
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/icon_preview"
|
android:id="@+id/options_root"
|
||||||
android:layout_width="64dp"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:scaleType="centerInside"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:ignore="ContentDescription"
|
|
||||||
tools:src="?attr/ic_asterisk" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/group_name_input_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:hint="@string/feed_group_dialog_name_input"
|
|
||||||
android:paddingTop="6dp"
|
|
||||||
android:paddingBottom="6dp"
|
|
||||||
app:errorEnabled="true"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/icon_preview"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/group_name_input"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:inputType="textCapSentences"
|
|
||||||
android:maxLines="1"
|
|
||||||
tools:ignore="LabelFor,UnusedAttribute" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/selected_subscription_count_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/group_name_input_container"
|
|
||||||
tools:text="15 selected" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/select_channel_button"
|
|
||||||
style="@style/Widget.AppCompat.Button.Borderless"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="180dp"
|
||||||
android:layout_marginStart="8dp"
|
android:orientation="vertical"
|
||||||
android:layout_marginEnd="8dp"
|
android:padding="8dp"
|
||||||
android:layout_marginBottom="4dp"
|
android:visibility="gone"
|
||||||
android:text="@string/feed_group_dialog_select_subscriptions"
|
tools:visibility="visible">
|
||||||
android:textAllCaps="true"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/selected_subscription_count_view" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<ImageButton
|
||||||
android:id="@+id/icon_selector"
|
android:id="@+id/icon_preview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="64dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="64dp"
|
||||||
android:layout_weight="1"
|
android:layout_gravity="center"
|
||||||
android:clipToPadding="false"
|
android:scaleType="centerInside"
|
||||||
android:padding="4dp"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:paddingTop="16dp"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:paddingBottom="16dp"
|
tools:ignore="ContentDescription"
|
||||||
android:visibility="gone"
|
tools:src="?attr/ic_asterisk" />
|
||||||
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
|
||||||
tools:listitem="@layout/picker_icon_item"
|
|
||||||
tools:spanCount="7" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/subscriptions_selector"
|
android:id="@+id/group_name_input_container"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingRight="16dp"
|
|
||||||
android:paddingBottom="12dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_marginStart="8dp"
|
||||||
android:gravity="start|center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="@string/tab_subscriptions"
|
android:hint="@string/feed_group_dialog_name_input"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:paddingTop="6dp"
|
||||||
android:textSize="16sp"
|
android:paddingBottom="6dp"
|
||||||
android:textStyle="bold" />
|
app:errorEnabled="true"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/icon_preview"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/group_name_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:inputType="textCapSentences"
|
||||||
|
android:maxLines="1"
|
||||||
|
tools:ignore="LabelFor,UnusedAttribute" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subscriptions_selector_header_info"
|
android:id="@+id/selected_subscription_count_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="start|center_vertical"
|
android:layout_marginTop="6dp"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
android:textSize="12sp"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:text="1 selected" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
</LinearLayout>
|
app:layout_constraintTop_toBottomOf="@+id/group_name_input_container"
|
||||||
|
tools:text="15 selected" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/select_channel_button"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="@string/feed_group_dialog_select_subscriptions"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/selected_subscription_count_view" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/subscriptions_selector_list"
|
android:id="@+id/icon_selector"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
tools:itemCount="200"
|
android:clipToPadding="false"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:visibility="gone"
|
||||||
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
tools:listitem="@layout/picker_subscription_item"
|
tools:listitem="@layout/picker_icon_item"
|
||||||
tools:spanCount="4" />
|
tools:spanCount="7" />
|
||||||
</LinearLayout>
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/subscriptions_selector"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:text="@string/tab_subscriptions"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/subscriptions_selector_header_info"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:text="1 selected" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/subscriptions_selector_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:itemCount="200"
|
||||||
|
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
tools:listitem="@layout/picker_subscription_item"
|
||||||
|
tools:spanCount="4" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/separator"
|
android:id="@+id/separator"
|
||||||
|
|
Loading…
Reference in a new issue