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.
Asked
Active
Viewed 269 times
2 Answers
1
Are you talking about Title bar? If so you can use the below code in your activity onCreate
function 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
-
Yea, I shouldn't have asked this lol. I found it right after I asked the question. Thanks anyways! – bhsu Dec 08 '11 at 04:34
-
he wants to hide the application name from the xml.... – Richa Dec 08 '11 at 05:53