How to hide the title bar for an Activity in XML with existing custom theme

前端 未结 30 1642
误落风尘
误落风尘 2020-11-22 03:28

I want to hide the titlebar for some of my activities. The problem is that I applied a style to all my activities, therefore I can\'t simply set the theme to @android:

30条回答
  •  醉话见心
    2020-11-22 03:52

    I now did the following.

    I declared a style inheriting everything from my general style and then disabling the titleBar.

    
    

    Now I can set this style to every Activity in which I want to hide the title bar overwriting the application wide style and inheriting all the other style informations, therefor no duplication in the style code.

    To apply the style to a particular Activity, open AndroidManifest.xml and add the following attribute to the activity tag;

    
    

提交回复
热议问题