Reputation: 737
It can remove title by setting requestWindowFeature(Window.FEATURE_NO_TITLE) in onCreat(). But the title display first, then disappear. How could the title not display? Could it set in manifest file?
Upvotes: 0
Views: 172
Reputation: 6533
just permission in activity which u want to have no title
android:theme="@android:style/Theme.NoTitleBar"
Upvotes: 1
Reputation: 27748
You should always use the requestWindowFeature(Window.FEATURE_NO_TITLE)
before using the setContentView
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.your_layout);
}
Upvotes: 0
Reputation: 1228
If you just want the default theme and no title, you can put this in your manifest file:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
You can also set it from the Theme
drop-down menu above your layout in eclipse.
Upvotes: 0
Reputation: 4255
use like this way..
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
}
Upvotes: 0
Reputation: 1704
Use like this in your manifest file:-
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar" >
Upvotes: 3