0

Does anybody know how to get rid of the bar at the top of the main.xml layout that says the name of your application? I want to get rid of it, but I don't know how.

bhsu
  • 392
  • 1
  • 7
  • 17

2 Answers2

1

Are you talking about Title bar? If so you can use the below code in your activity onCreatefunction to remove the title bar.

requestWindowFeature(Window.FEATURE_NO_TITLE);

make sure you call it before setContentView().

Karthik
  • 3,509
  • 1
  • 20
  • 26
0

In your Android Manifest.xml file where you added the Activity set the theme to Theme.NoTitleBar like this:

<activity android:name="com.onsource.activity.MainActivity"
              android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar">
Kaediil
  • 5,465
  • 2
  • 21
  • 20