Enable scrolling in screen flash color selector dialog

Screen flash color selector dialog doesn't display correctly in
landscappe mode when adjust to large display size from 'Accessibility >
Display size and text > Display size'. Make the layout be scrollable to
prevent strange clipped UI.

Bug:287671988
Test: check the UI manually
Change-Id: I37eb604d362fe4373d26f97a9397230babc6eafd
This commit is contained in:
Angela Wang
2023-06-30 12:08:51 +00:00
parent 369a1097c8
commit 2539a6a10e
2 changed files with 152 additions and 150 deletions

View File

@@ -14,13 +14,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/color_selector_root_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -171,4 +176,5 @@
android:contentDescription="@string/screen_flash_color_violet" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -17,16 +17,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="24dp">
android:gravity="center_horizontal"
android:orientation="vertical">
<com.android.settings.accessibility.ColorSelectorLayout
android:id="@+id/color_selector_preference"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginHorizontal="25dp"
android:layout_marginTop="21dp"
android:orientation="vertical" />
android:layout_height="wrap_content"/>
</LinearLayout>