How to use device default theme for app?

前端 未结 2 2052
南方客
南方客 2020-11-28 05:53

I have an app that I want to develop for Android 2.1, 2.2, 2.3.3, 3.0/3.1 and 4.0.x. Between those API levels, there are about 3 different types of Themes. The latest 4.0.x

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 05:57

    You can declare a theme in your values/styles.xml and then in your values-v11/styles.xml override it with the Holo-version:

    values/styles.xml:

     
    

    values-v11/styles.xml:

     
    

    Do it that way, and you'll have Holo themes on API 11+ devices and regular themes on the others.

    Regards Steffen Vangsgaard

提交回复
热议问题