From 6fe262dae987f9c11cbf5f839a31f10936e40495 Mon Sep 17 00:00:00 2001 From: Dake Gu Date: Thu, 1 Oct 2015 14:54:19 -0700 Subject: [PATCH] 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 --- .../app/src/main/AndroidManifest.xml | 2 +- .../app/src/main/res/layout/activity_cards_example.xml | 2 -- .../app/src/main/res/layout/activity_detail_example.xml | 2 -- .../app/src/main/res/layout/activity_music_example.xml | 1 - .../app/src/main/res/values/themes.xml | 9 ++++++++- 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"> + android:theme="@style/Theme.Example.LeanbackMusic"> 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 @@ --> + @drawable/background_canyon + + + +