From d321b8690ec69ba1dd05570e3c3b8f16cb931161 Mon Sep 17 00:00:00 2001 From: Yi-Ling Chuang Date: Tue, 4 May 2021 19:14:19 +0800 Subject: [PATCH] Set background color to the AppBarLayout During the page transition, the back arrow on the action bar is acting as a shared element. The transition seems to render the shared element first and then the other parts of the UI. As the background color of the AppBarLayout is transparent, so during the rendering process, the UI will flash/blink for a few milliseconds and the content behind the AppBarLayout will be shown. Hence, set a background color to the AppBarLayout to fix this issue. Fixes: 186701900 Test: rebuild and review Display Settings page transition Change-Id: Id009b47d983adafd8b92af585b5089c68de0afc3 --- .../res/layout-v31/collapsing_toolbar_base_layout.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml index 579a6b2037605..d8b49ab786aff 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml @@ -30,7 +30,7 @@ android:fitsSystemWindows="true" android:outlineAmbientShadowColor="@android:color/transparent" android:outlineSpotShadowColor="@android:color/transparent" - android:background="@android:color/transparent" + android:background="?android:attr/colorPrimary" android:theme="@style/Theme.CollapsingToolbar.Settings">