ActionBar is good for UE, but sometimes we do want to hide it. Here we will see the ways to do it.
You can hide it in your
supportActionBar?.hide() did the job. Start the app, and it works.
First, add a new style in the
Then, open the
AndroidManifest.xml and apply it to the activity you want to hide the action bar. Start the app, and it works.
The above 2 ways works, but they won’t affect the designer. Which makes it inconsistent to design the UI. In order to apply it to the designer, you need to manually select it in the Android Studio UI Designer.
Find the button which applies the theme to UI, should be at the top area of the UI designer, a button between the following 2 features:
- API version in Editor
- Locale in Editor
Theme in Editor, click it to open the menu, and select a theme without ActionBar. Then it works.
Hope it helps. :)