开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜