How can I hide the title bar in an android application

时间:2016-04-04 18:17:58

标签: java android css

I have been trying to find a way to hide the title bar in my android application. I used @android:style/Theme.NoTitleBar.Fullscreen in the android manifest. It worked but the background gets set to black and all the text views get set to white. Is their a way to have the background set to white and text to black without having to set them all individually?

2 个答案:

答案 0 :(得分:0)

You can ovveride the Theme.NoTitleBar.Fullscreen background color/text colors by applying additional styles. For example if you wanted your background color to be white you would apply the style:

@color/your_background__color

答案 1 :(得分:0)

For a simple version, try to use Theme.AppCompat.Light.NoActionBar. This will keep "light" theme but remove action bar.