diff options
| author | 2024-11-21 17:46:26 +0800 | |
|---|---|---|
| committer | 2024-11-21 17:49:00 +0800 | |
| commit | 213033ecf41f17aebd766abfa7af7c789f245ff7 (patch) | |
| tree | b18af278d2357b7275b67b67213b93cb5b709901 | |
| parent | fc5f20ff851de906b9c46c66b2bb2269cffc3336 (diff) | |
Make PreferenceActivity and PreferenceFragment handle insets properly
This CL makes sure the content of the activity and the fragment won't be
obscured by system window insets.
Bug: 377864165
Bug: 309578419
Flag: com.android.window.flags.enforce_edge_to_edge
Test: atest CtsPreferenceTestCases without
windowOptOutEdgeToEdgeEnforcement
Change-Id: Iff8cbd93c0ef79bc8aad68ed8459ebda69fa4897
6 files changed, 6 insertions, 0 deletions
diff --git a/core/res/res/layout-sw600dp/preference_list_content_single.xml b/core/res/res/layout-sw600dp/preference_list_content_single.xml index 88b1aa8d4d00..ebe4eca1b156 100644 --- a/core/res/res/layout-sw600dp/preference_list_content_single.xml +++ b/core/res/res/layout-sw600dp/preference_list_content_single.xml @@ -19,6 +19,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent"> diff --git a/core/res/res/layout/preference_list_content.xml b/core/res/res/layout/preference_list_content.xml index bed80edf0ee7..7a2fb0b3b822 100644 --- a/core/res/res/layout/preference_list_content.xml +++ b/core/res/res/layout/preference_list_content.xml @@ -20,6 +20,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent"> diff --git a/core/res/res/layout/preference_list_content_material.xml b/core/res/res/layout/preference_list_content_material.xml index 37b411918ef6..23c82509b6b0 100644 --- a/core/res/res/layout/preference_list_content_material.xml +++ b/core/res/res/layout/preference_list_content_material.xml @@ -20,6 +20,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent"> diff --git a/core/res/res/layout/preference_list_content_single.xml b/core/res/res/layout/preference_list_content_single.xml index 726ce78b281f..4f072da99546 100644 --- a/core/res/res/layout/preference_list_content_single.xml +++ b/core/res/res/layout/preference_list_content_single.xml @@ -19,6 +19,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent"> diff --git a/core/res/res/layout/preference_list_fragment.xml b/core/res/res/layout/preference_list_fragment.xml index c43975e4ad3c..44a5df9b60be 100644 --- a/core/res/res/layout/preference_list_fragment.xml +++ b/core/res/res/layout/preference_list_fragment.xml @@ -19,6 +19,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent" android:background="@android:color/transparent" diff --git a/core/res/res/layout/preference_list_fragment_material.xml b/core/res/res/layout/preference_list_fragment_material.xml index db2fe7d038e0..4df76029e606 100644 --- a/core/res/res/layout/preference_list_fragment_material.xml +++ b/core/res/res/layout/preference_list_fragment_material.xml @@ -19,6 +19,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent" android:background="@android:color/transparent" |