Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Android App Title Bar

I understand that these properties in the manifest:

android:theme="@android:style/Theme.NoTitleBar"      android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 

can remove the title bar. However, I constantly check the Graphical Layout when I am modifying my app. When I look at the Graphical Layout I still see the title bar. I want to remove the title bar in a way that I don't have to see it during the development of the game.

like image 265
Harrison Tran Avatar asked Jan 23 '13 08:01

Harrison Tran


People also ask

How do I disable the title bar?

So basically we just need to change DarkActionBar to NoActionBar. NoActionBar theme prevents the app from using the native ActionBar class to provide the app bar. Thus it removes the title of every activity. Another way for removing the title specifically from an activity is by using a getSupportActionBar().

How do I hide labels on android?

You have two ways to hide the title bar by hiding it in a specific activity or hiding it on all of the activity in your app. You can achieve this by create a custom theme in your styles. xml . If you are using AppCompatActivity, there is a bunch of themes that android provides nowadays.


1 Answers

Simple way is to put this in your onCreate():

// Java getSupportActionBar().hide(); 
// Kotlin supportActionBar?.hide() 
like image 101
bikash giri Avatar answered Oct 15 '22 11:10

bikash giri