diff options
author | Dake Gu <dake@google.com> | 2015-10-01 14:54:19 -0700 |
---|---|---|
committer | Dake Gu <dake@google.com> | 2015-10-01 15:10:07 -0700 |
commit | 6fe262dae987f9c11cbf5f839a31f10936e40495 (patch) | |
tree | cab89b6aa81a1f489381b49b1674e8d11ec104c8 | |
parent | ab2a8a7dae6fae5bc97240c47a68d6a7b93221b1 (diff) | |
download | android_development-6fe262dae987f9c11cbf5f839a31f10936e40495.tar.gz android_development-6fe262dae987f9c11cbf5f839a31f10936e40495.tar.bz2 android_development-6fe262dae987f9c11cbf5f839a31f10936e40495.zip |
Supportleanbackshowcase: Polishing 2 and transition performance fix
Move background of browse/details/music from layout to windowBackground.
Setting background on view will cause the whole RelativeLayout being
faded in while transition move content inside the RelativeLayout.
The RelativeLayout does not have a hardwarelayer, nor does it specify
hasOverlappingRendering=false. This falls to the slowest rendering
path.
Change-Id: I78bacc965e641d7f960aae5cf212c29f6b1f0f11
5 files changed, 9 insertions, 7 deletions
diff --git a/samples/SupportLeanbackShowcase/app/src/main/AndroidManifest.xml b/samples/SupportLeanbackShowcase/app/src/main/AndroidManifest.xml index cc84e9cc7..087bbd3ab 100644 --- a/samples/SupportLeanbackShowcase/app/src/main/AndroidManifest.xml +++ b/samples/SupportLeanbackShowcase/app/src/main/AndroidManifest.xml @@ -53,7 +53,7 @@ android:theme="@style/Theme.Example.Leanback"></activity> <activity android:name=".app.media.MusicExampleActivity" - android:theme="@style/Theme.Example.Leanback"></activity> + android:theme="@style/Theme.Example.LeanbackMusic"></activity> </application> </manifest> diff --git a/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_cards_example.xml b/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_cards_example.xml index 903c52fd3..45b550567 100644 --- a/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_cards_example.xml +++ b/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_cards_example.xml @@ -16,8 +16,6 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:background="@color/card_examples_background" - android:transitionGroup="false" android:layout_height="match_parent"> <fragment diff --git a/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_detail_example.xml b/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_detail_example.xml index 233bad9e5..1dd92d8c9 100644 --- a/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_detail_example.xml +++ b/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_detail_example.xml @@ -16,8 +16,6 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:background="@drawable/background_canyon" - android:transitionGroup="false" android:layout_height="match_parent"> <fragment android:id="@+id/detailsFragment" diff --git a/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_music_example.xml b/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_music_example.xml index 30f150161..9eef61a91 100644 --- a/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_music_example.xml +++ b/samples/SupportLeanbackShowcase/app/src/main/res/layout/activity_music_example.xml @@ -16,7 +16,6 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:background="@drawable/background_sax" android:layout_height="match_parent"> <fragment diff --git a/samples/SupportLeanbackShowcase/app/src/main/res/values/themes.xml b/samples/SupportLeanbackShowcase/app/src/main/res/values/themes.xml index 2f6822b69..feb9f036a 100644 --- a/samples/SupportLeanbackShowcase/app/src/main/res/values/themes.xml +++ b/samples/SupportLeanbackShowcase/app/src/main/res/values/themes.xml @@ -27,6 +27,7 @@ </style> <style name="Theme.Example.LeanbackBrowse" parent="Theme.Leanback.Browse"> + <item name="android:windowBackground">@color/card_examples_background</item> </style> <style name="Theme.Example.LeanbackVerticalGrid" parent="Theme.Leanback.VerticalGrid"> @@ -51,5 +52,11 @@ <style name="Theme.Example.LeanbackDetails" parent="Theme.Leanback.Details"> <item name="android:colorPrimary">@color/detail_view_actionbar_background</item> - </style> + <item name="android:windowBackground">@drawable/background_canyon</item> + </style> + + <style name="Theme.Example.LeanbackMusic" parent="Theme.Example.Leanback"> + <item name="android:windowBackground">@drawable/background_sax</item> + </style> + </resources> |