Files
app_Settings/res/layout/accessibility_text_reading_preview.xml
Roy Chou b3fb8e0154 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
2023-10-26 13:28:50 +00:00

57 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="@dimen/settingslib_illustration_padding"
android:paddingEnd="@dimen/text_reading_preview_padding_end"
android:paddingStart="@dimen/text_reading_preview_padding_start">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/accessibility_text_reading_preview"
android:clipChildren="true"
android:orientation="vertical"
android:paddingVertical="@dimen/text_reading_preview_background_padding_vertical"
android:paddingHorizontal="@dimen/text_reading_preview_background_padding_horizontal">
<TextView
android:id="@+id/preview_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/screen_zoom_preview_title"
style="@style/AccessibilityTextReadingPreviewTitle" />
<com.android.settings.accessibility.TextReadingPreviewPager
android:id="@+id/preview_pager"
android:layout_width="match_parent"
android:layout_height="217dp"
android:contentDescription="@string/preview_pager_content_description" />
<com.android.settings.widget.DotsPageIndicator
android:id="@+id/page_indicator"
style="@style/PreviewPagerPageIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="6dp"
android:visibility="gone" />
</LinearLayout>
</FrameLayout>