I'm making a small android application, and I want to remove the android title bar.
I've tried using the
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
But it still makes the title bar show for 0,1 second when the application starts. I would love to make it not even show it when the app is loading.
I've searched a bit around, and somebody mentions that you can change the style of the app, but I have no idea how to do that. I've only just started making apps, so I don't have a lot of experience.
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().
If you want to hide Action Bar from the entire application (from all Activities and fragments), then you can use this method. Just go to res -> values -> styles. xml and change the base application to “Theme. AppCompat.
Code that hides title bar of activity The getSupportActionBar() method is used to retrieve the instance of ActionBar class. Calling the hide() method of ActionBar class hides the title bar.
try this:
in your application tag in manifest add android:theme
,like follow:
<application android:theme="@android:style/Theme.NoTitleBar" ...>
To do that I declared a style inheriting everything from my general style. This style disabled the default Android titleBar.
<style name="generalnotitle" parent="general">
<item name="android:windowNoTitle">true</item>
</style>
Create a new style and add this style in your different views or add this code in the default style to disabled the titleBar for all windows!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With