Skip to content

Commit

Permalink
Make another attempt to fix buttons on small screens
Browse files Browse the repository at this point in the history
There is still an issue in that the "error" state for cells
within feeds shows three buttons that cannot fit onscreen.

Affects: https://ebce-lyrasis.atlassian.net/browse/PP-631
  • Loading branch information
io7m committed Oct 25, 2023
1 parent 391e709 commit c43fa22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
15 changes: 8 additions & 7 deletions simplified-ui-catalog/src/main/res/layout/book_cell_error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
android:layout_marginStart="32dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:weightSum="4"
android:weightSum="3"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -68,9 +69,9 @@
<Button
android:id="@+id/bookCellErrorButtonDismiss"
style="@style/Palace.Button.Outlined.Small"
android:layout_width="0dp"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:text="@string/catalogDismiss" />

<Space
Expand All @@ -80,9 +81,9 @@
<Button
android:id="@+id/bookCellErrorButtonDetails"
style="@style/Palace.Button.Outlined.Small"
android:layout_width="0dp"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:text="@string/catalogDetails" />

<Space
Expand All @@ -92,9 +93,9 @@
<Button
android:id="@+id/bookCellErrorButtonRetry"
style="@style/Palace.Button.Outlined.Small"
android:layout_width="0dp"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:text="@string/catalogRetry" />
</LinearLayout>

Expand Down
10 changes: 3 additions & 7 deletions simplified-ui-catalog/src/main/res/layout/book_cell_idle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:weightSum="4"
android:layout_marginBottom="8dp"
android:gravity="center_vertical"
android:orientation="horizontal"
Expand All @@ -89,9 +88,8 @@
<!-- These views are removed at runtime and are just present for the sake of the UI editor preview -->

<Button
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_weight="1"
android:maxWidth="64dp"
android:visibility="gone"
tools:text="@string/catalogDismiss"
Expand All @@ -104,9 +102,8 @@
tools:visibility="visible" />

<Button
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_weight="1"
android:maxWidth="64dp"
android:visibility="gone"
tools:text="@string/catalogDetails"
Expand All @@ -119,9 +116,8 @@
tools:visibility="visible" />

<Button
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="@dimen/catalogFeedCellButtonsHeight"
android:layout_weight="1"
android:maxWidth="64dp"
android:visibility="gone"
tools:text="@string/catalogRetry"
Expand Down

0 comments on commit c43fa22

Please sign in to comment.