docs: New section explaining how to set the custom launch color of TV app
NOTE: Cherry picked from: https://googleplex-android-review.git.corp.google.com/#/c/732032/ Contains updates incorporating all feedback from Andy's original CL. Updated with suggestion from Andrew. Bug: 21274505 Change-Id: If43ba81e770a39239108b8fa9731c2b4df3a9ae6
This commit is contained in:
@@ -228,6 +228,27 @@ supported by Android TV.</p>
|
||||
design guide.
|
||||
</p>
|
||||
|
||||
<h3 id="transition-color">Change the launcher color</h3>
|
||||
|
||||
<p>When a TV app launches, the system displays an animation that resembles an expanding, filled
|
||||
circle. To customize the color of this animation, set the <code>android:colorPrimary</code>
|
||||
attribute of your TV app or activity to a specific color. You should also set two additional
|
||||
transition overlap attributes to <code>true</code>, as shown in the following snippet from a
|
||||
theme resource XML file:</p>
|
||||
|
||||
<pre>
|
||||
<resources>
|
||||
<style ... >
|
||||
<item name="android:colorPrimary">@color/primary</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
</pre>
|
||||
|
||||
<p>For more information about working with themes and styles, see
|
||||
<a href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a>.</p>
|
||||
|
||||
<h2 id="tv-libraries">Add TV Support Libraries</h3>
|
||||
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user