how to Remove the space for showing Application name
I developed an application. I would like to remove space that is used for showing application name on top of my application UI. (The Title Bar)
开发者_JS百科I set Application label as null In manifest File But it will not remove the space for showing Application name
Please tell me what is the correct or possible way to do that
Thanks in advance
You request window feature in your onCreate method:
@Override
public void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
}
or in AndroidManifest.xml:
<activity android:name=".YourClassName"
android:theme="@android:style/Theme.NoTitleBar">
</activity>
i think you can add this line in you application tag in android manifest file
android:theme="@android:style/Theme.NoTitleBar"
For android studio:
In android AndroidManifest.xml file change the theme like: android:theme="@style/Theme.AppCompat.Light.NoActionBar"
example
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" >
you can use this style
<style name="MyTheme" parent="@android:style/Theme.NoTitleBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@drawable/xyz</item>
</style>
精彩评论