Loading res/layout/settings_homepage_container_v2.xml +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="8dp" android:paddingTop="@dimen/search_bar_container_top_padding" android:paddingBottom="16dp" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> Loading res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ <dimen name="search_bar_padding_end_two_pane">24dp</dimen> <dimen name="search_bar_title_padding_start">-4dp</dimen> <dimen name="search_bar_title_padding_start_regular_two_pane">8dp</dimen> <dimen name="search_bar_container_top_padding">8dp</dimen> <!-- Avatar --> <dimen name="avatar_length">48dp</dimen> Loading res/values/themes.xml +0 −3 Original line number Diff line number Diff line Loading @@ -190,9 +190,6 @@ <!-- Define this color for material design --> <item name="colorPrimaryVariant">@android:color/white</item> <!-- Workaround for E2E modification. --> <!-- TODO (b/328622648) waiting for new method instead of this attribute. --> <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item> </style> <style name="Theme.Settings.Home" parent="Theme.Settings.HomeBase"> Loading src/com/android/settings/homepage/SettingsHomepageActivity.java +12 −4 Original line number Diff line number Diff line Loading @@ -395,9 +395,18 @@ public class SettingsHomepageActivity extends FragmentActivity implements WindowCompat.setDecorFitsSystemWindows(getWindow(), false); ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content), (v, windowInsets) -> { Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()); Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); // Apply the insets paddings to the view. v.setPadding(insets.left, insets.top, insets.right, insets.bottom); v.setPadding(insets.left, 0, insets.right, insets.bottom); // reset the top padding of search bar container to original top padding // plus insets top. View container = findViewById(R.id.app_bar_container); final int top_padding = getResources().getDimensionPixelSize( R.dimen.search_bar_container_top_padding); container.setPadding(container.getPaddingLeft(), top_padding + insets.top, container.getPaddingRight(), container.getPaddingBottom()); // Return CONSUMED if you don't want the window insets to keep being // passed down to descendant views. Loading Loading @@ -466,8 +475,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements : Utils.getColorAttrDefaultColor(this, android.R.attr.colorBackground); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); // Update status bar color window.setStatusBarColor(color); // Update content background. findViewById(android.R.id.content).setBackgroundColor(color); if (Flags.homepageRevamp()) { Loading Loading
res/layout/settings_homepage_container_v2.xml +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingTop="8dp" android:paddingTop="@dimen/search_bar_container_top_padding" android:paddingBottom="16dp" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> Loading
res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ <dimen name="search_bar_padding_end_two_pane">24dp</dimen> <dimen name="search_bar_title_padding_start">-4dp</dimen> <dimen name="search_bar_title_padding_start_regular_two_pane">8dp</dimen> <dimen name="search_bar_container_top_padding">8dp</dimen> <!-- Avatar --> <dimen name="avatar_length">48dp</dimen> Loading
res/values/themes.xml +0 −3 Original line number Diff line number Diff line Loading @@ -190,9 +190,6 @@ <!-- Define this color for material design --> <item name="colorPrimaryVariant">@android:color/white</item> <!-- Workaround for E2E modification. --> <!-- TODO (b/328622648) waiting for new method instead of this attribute. --> <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item> </style> <style name="Theme.Settings.Home" parent="Theme.Settings.HomeBase"> Loading
src/com/android/settings/homepage/SettingsHomepageActivity.java +12 −4 Original line number Diff line number Diff line Loading @@ -395,9 +395,18 @@ public class SettingsHomepageActivity extends FragmentActivity implements WindowCompat.setDecorFitsSystemWindows(getWindow(), false); ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content), (v, windowInsets) -> { Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()); Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); // Apply the insets paddings to the view. v.setPadding(insets.left, insets.top, insets.right, insets.bottom); v.setPadding(insets.left, 0, insets.right, insets.bottom); // reset the top padding of search bar container to original top padding // plus insets top. View container = findViewById(R.id.app_bar_container); final int top_padding = getResources().getDimensionPixelSize( R.dimen.search_bar_container_top_padding); container.setPadding(container.getPaddingLeft(), top_padding + insets.top, container.getPaddingRight(), container.getPaddingBottom()); // Return CONSUMED if you don't want the window insets to keep being // passed down to descendant views. Loading Loading @@ -466,8 +475,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements : Utils.getColorAttrDefaultColor(this, android.R.attr.colorBackground); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); // Update status bar color window.setStatusBarColor(color); // Update content background. findViewById(android.R.id.content).setBackgroundColor(color); if (Flags.homepageRevamp()) { Loading