From b3fb8e01542c35671d7b0ae97505e60911828a9b Mon Sep 17 00:00:00 2001 From: Roy Chou Date: Thu, 26 Oct 2023 08:17:22 +0000 Subject: [PATCH] chore(text reading settings): increase preview block left/right padding when landscape mode for easier scrolling When the device is in landscape mode, In the text reading preference page, users have difficulty scrolling the RecyclerView because the preview block is almost full-screen. To scroll the preference list, users typically try to pan the preview block, but the block consumes the scroll gesture, preventing the list from scrolling. Users can successfully scroll the list content by panning outside the preview block. As a quick workaround, we increase the left/right padding of the preview block for landscape mode to make it easier for users to pan outside the block and scroll the preference list. Bug: 301683714 Flag: NA Test: manually - attach screenshot in bug Change-Id: I1dba6e4d83ee1cd2f30163de05dfd7b42f829e42 --- res/layout/accessibility_text_reading_preview.xml | 7 ++++--- res/values-land/dimens.xml | 5 +++++ res/values/dimens.xml | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/res/layout/accessibility_text_reading_preview.xml b/res/layout/accessibility_text_reading_preview.xml index 4b70bb40b6c..f76bb1ccfe7 100644 --- a/res/layout/accessibility_text_reading_preview.xml +++ b/res/layout/accessibility_text_reading_preview.xml @@ -19,8 +19,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="@dimen/settingslib_illustration_padding" - android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" - android:paddingStart="?android:attr/listPreferredItemPaddingStart"> + android:paddingEnd="@dimen/text_reading_preview_padding_end" + android:paddingStart="@dimen/text_reading_preview_padding_start"> + android:paddingVertical="@dimen/text_reading_preview_background_padding_vertical" + android:paddingHorizontal="@dimen/text_reading_preview_background_padding_horizontal"> 348dp 300dp + + + 64dp + 64dp + 72dp diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 205e2a3d310..2c347e2fc6d 100755 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -226,6 +226,12 @@ 4dp 11dp + + @*android:dimen/list_item_padding_end_material + @*android:dimen/list_item_padding_end_material + 18dp + 18dp + 16dp 176dp