-1

Please suggest ways to remove/hide the name of activity from action bar of my app. If there is a tutorial or a guide available on how to do it, that would be great. TIA

shrbisht
  • 676
  • 3
  • 9
  • 23

4 Answers4

2

If you want to edit it from the code then

getActionBar().setTitle("Edited Title"); 

or

getSupportActionBar().setTitle("Edited Title");

this might help you https://developer.android.com/training/basics/actionbar/styling.html

sunj
  • 111
  • 2
  • 6
2

Try this code before setting the content view in the activity oncreate method.

requestWindowFeature(Window.FEATURE_NO_TITLE);

Mark Henry
  • 255
  • 3
  • 8
1

yes, you need to change the theme of your application.

<activity android:name=".MyActivity"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
</activity>
Sumeet Rathore
  • 232
  • 3
  • 16
0

Just set "android:theme" attribute to "@android:style/Theme.NoTitleBar" on your element in your AndroidManifest.xml file

<activity android:name=".MyActivity"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar">
</activity>