Setting Android Background & Persistence Menu Bar - Using attribute on older versions causes crash - Is there a theme /pattern approach?

后端 未结 1 515
离开以前
离开以前 2020-12-12 13:25

In Android 3.0, the concept of \"checked\" can be rendered using an \"activated\" background. This gives you the persistent bar you see when you tap on a list fragment, prov

1条回答
  •  抹茶落季
    2020-12-12 14:21

    Styles are your friend....

    Have two values directories, one is values-v11, the other the default values.

    Each values directory contains a styles.xml, the difference being that the default values one contains;

    
    

    Then you can have a single layout which uses;

    style="@style/listViewActivatedStyle"
    

    and the appropriate one is selected.

    0 讨论(0)
提交回复
热议问题