Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2014 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2f10cb1687506ba5311b to your computer and use it in GitHub Desktop.
Save anonymous/2f10cb1687506ba5311b to your computer and use it in GitHub Desktop.
<style name="AppTheme" parent="@style/Theme.Leanback"> </style> <!-- in Theme.Leanback --> <style name="Widget.Leanback.ImageCardViewStyle" parent="Widget.Leanback.BaseCardViewStyle"> <item name="cardType">infoUnder</item> <item name="infoVisibility">activated</item> <!-- i want to override this --> <item name="android:background">@color/lb_bas…
<style name="AppTheme" parent="@style/Theme.Leanback">
</style>
<!-- in Theme.Leanback -->
<style name="Widget.Leanback.ImageCardViewStyle" parent="Widget.Leanback.BaseCardViewStyle">
<item name="cardType">infoUnder</item>
<item name="infoVisibility">activated</item>
<!-- i want to override this -->
<item name="android:background">@color/lb_basic_card_bg_color</item>
</style>
@petetandon
Copy link

what is the style for "Widget.Leanback.BaseCardViewStyle"

@netpork
Copy link

netpork commented Sep 17, 2014

<style name="Widget.Leanback.BaseCardViewStyle" />

@petetandon
Copy link

try this instead:

<style name="Widget.Leanback.BaseCardViewStyle.ImageCardViewStyle">
        <item name="cardType">infoUnder</item>
        <item name="infoVisibility">activated</item>
        <!-- i want to override this -->
        <item name="android:background">@color/lb_basic_card_bg_color</item>
</style>

@netpork
Copy link

netpork commented Sep 17, 2014

from the manifest i target theme

<android:theme="@style/AppTheme" >
   <style name="AppTheme" parent="Theme.Leanback">
        <item name="@style/Widget.Leanback.ImageCardViewStyle">@style/my</item>
    </style>

    <style name="my">
        <item name="cardType">infoUnder</item>
        <item name="infoVisibility">selected</item>
        <!-- i want to override this -->
        <item name="android:background">@color/orange</item>
    </style>

i have tried this, doesnt work! :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment