Is there anyway to remove activity label bar and label itself which is set by default from application label? I'd like to have whole layout from my design and need to remove the label bar and label which is in TOP layout.
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.
The requestWindowFeature(Window. FEATURE_NO_TITLE) method of Activity must be called to hide the title.
You can achieve this by setting the android:theme
attribute to @android:style/Theme.NoTitleBar
on your <activity>
element in your AndroidManifest.xml like this:
<activity android:name=".Activity" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
If your application theme is AppTheme(or anything else), then in styles.xml add the following code:
<style name="HiddenTitleTheme" parent="AppTheme"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> </style>
Then in manifest file add the following in the activity tag for which you want to disable activity label:
android:theme="@style/HiddenTitleTheme"
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