Android default theme

前端 未结 3 990
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-12 21:53

I am making one android application but i was thinking about themes..

If i don\'t declare a theme of my Android application which theme will be used? Where i can find t

3条回答
  •  借酒劲吻你
    2021-02-12 22:19

    It is best to define a default theme yourself instead of relying on android to pick the default theme. This is because different versions of android may have completely different default themes, and could mess up your layouts.

    You can declare a theme for your application in AndroidManifest.xml

    
    

    Then in res/values folder, you edit/add a file themes.xml and add something like the following:

    
    
        
    
    

    You can edit the parent of your theme to anything you want...

    You can also use @android:style/Theme.Holo directly in AndroidManifest.xml if you do not want any customization at all.

    Use Theme.AppCompat.Holo if API version below 11

提交回复
热议问题