Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c24702e1 authored by Justin Mattson's avatar Justin Mattson
Browse files

Add a theme for setup and/or form style input for TV/leanback

Theme initially adds customized text appearances that should work
better in the leanback environment. Device makers could modify the
theme and then apps participating in the device setup experience
can all use this theme for those activities to provide a more
cohesive user experience during the setup process.

Bug: 16223105
Change-Id: I3d9f83e29ddce2a0a4e6b501d01a7365c1d11b5b
parent 1c41116f
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:drawable="@color/black"/>
</layer-list>
+4 −0
Original line number Diff line number Diff line
@@ -2483,6 +2483,10 @@

  <public-padding type="interpolator" name="l_resource_pad" end="0x010c0010" />

  <!-- @SystemApi -->
  <!-- @hide -->
  <public type="style" name="Theme.Leanback.FormWizard"/>

  <!-- An interpolator which accelerates fast but decelerates slowly. -->
  <public type="interpolator" name="fast_out_slow_in" />
  <!-- An interpolator which starts with a peak non-zero velocity and decelerates slowly. -->
+26 −0
Original line number Diff line number Diff line
@@ -30,4 +30,30 @@
        <item name="hideWheelUntilFocused">true</item>
    </style>

    <!-- Setup and form wizard themes -->
    <style name="TextAppearance.Leanback.FormWizard" parent="@style/TextAppearance.Material">
        <item name="textSize">18sp</item>
        <item name="fontFamily">sans-serif-light</item>
    </style>

    <style name="TextAppearance.Leanback.FormWizard.Small" parent="@style/TextAppearance.Material.Small">
        <item name="textSize">18sp</item>
        <item name="fontFamily">sans-serif-light</item>
    </style>

    <style name="TextAppearance.Leanback.FormWizard.Medium" parent="@style/TextAppearance.Material.Medium">
        <item name="textSize">36sp</item>
        <item name="fontFamily">sans-serif-thin</item>
    </style>

    <style name="TextAppearance.Leanback.FormWizard.Large" parent="@style/TextAppearance.Material.Large">
        <item name="textSize">56sp</item>
        <item name="fontFamily">sans-serif-thin</item>
    </style>

    <style name="TextAppearance.Leanback.FormWizard.ListItem" parent="@style/TextAppearance.Material.Subhead">
        <item name="textSize">18sp</item>
        <item name="fontFamily">sans-serif-condensed</item>
    </style>

</resources>
+13 −0
Original line number Diff line number Diff line
@@ -62,4 +62,17 @@
        <item name="windowCloseOnTouchOutside">false</item>
        <item name="alertDialogStyle">@style/AlertDialog.Leanback</item>
    </style>

    <!-- Setup and form wizard themes -->

    <style name="Theme.Leanback.FormWizard" parent="Theme.Material.NoActionBar">
        <item name="windowBackground">@drawable/background_leanback_setup</item>
        <item name="colorBackgroundCacheHint">@null</item>
        <item name="windowShowWallpaper">false</item>
        <item name="textAppearanceSmall">@style/TextAppearance.Leanback.FormWizard.Small</item>
        <item name="textAppearanceMedium">@style/TextAppearance.Leanback.FormWizard.Medium</item>
        <item name="textAppearanceLarge">@style/TextAppearance.Leanback.FormWizard.Large</item>
        <item name="textAppearanceListItem">@style/TextAppearance.Leanback.FormWizard.ListItem</item>
        <item name="textAppearance">@style/TextAppearance.Leanback.FormWizard</item>
    </style>
</resources>