I know this question has been asked million times but whichever method I use is not good for me.
If I use
android:theme="@android:style/Theme.NoTitleBar"
in the manifest file, the whole theme of the app changes. If I put
requestWindowFeature(Window.FEATURE_NO_TITLE);
in the onCreate activities, it shows up shortly when starting an app.
Btw I don't have any theme selected, just using standard android.
The getSupportActionBar() method is used to retrieve the instance of ActionBar class. Calling the hide() method of ActionBar class hides the title bar.
To hide the Title Bar using the Android Manifest. xml file you need to set the Android theme to NoTitleBar like this: android:theme="@android:style/Theme. NoTitleBar">
It is unclear what you mean by "whole theme of app changes". For API Level 11+ devices, you probably should be using @android:style/Theme.Holo.NoActionBar
.
If you add the theme to the application, it applies to the whole app.
android:theme="@android:style/Theme.NoTitleBar"
You have to add it to the activity declaration.
<activity android:name=".YourActivity" android:theme="@android:style/Theme.NoTitleBar"/>
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