Android Studio: App With No Title Bar
Removing the title bar in Android Studio from an app is relatively simple.
- You can preview different Android themes by clicking on the AppTheme button in Design view when looking at layouts.
- Click on the AppTheme button, go to All, choose NoTitleBar, and click OK. This provides you with a preview of what you app will look like without a title bar.
Preview of App With No Title Bar
- You can also preview your app in devices using different screen sizes, including tablets, by clicking on the phone icon and choosing the Preview All Screen Sizes options in Design view when looking at layouts. To preview the look of your app in landscape or portrait orientation, click on the orientation icon.
Click on Phone Icon and Choose Preview All Screen Sizes
Preview Your App in Landscape or Portrait Orientation
-
Keep in mind that changing the theme using the AppTheme button only provides a preview. You must change the theme inside the styles.xml file to make the change permanent (res folder -> values folder -> styles.xml file).
-
In the styles.xml file, change the theme to one with no title bar (add a period to the end of the theme name and you should see a pop up with various theme options; choose the .NoActionBar theme).
Change Theme in the styles.xml file
-
Go back to the Design view. Your app should no longer have a title bar!
-
Keep in mind that if you are using a newer version of Android Studio, that you should also change the theme in other styles.xml files that support newer versions of Android (e.g. when creating apps that support Google’s new material design, you will notice that there is a folder titled values-v21; also change the theme in the styles.xml file found inside that folder).