Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

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

like image 788
Dev.Sinto Avatar asked Dec 09 '10 09:12

Dev.Sinto


3 Answers

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>
like image 182
danizmax Avatar answered Nov 18 '22 08:11

danizmax


i think you can add this line in you application tag in android manifest file

android:theme="@android:style/Theme.NoTitleBar"

like image 6
Sunit Kumar Gupta Avatar answered Nov 18 '22 06:11

Sunit Kumar Gupta


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" >
like image 5
Vamkos Avatar answered Nov 18 '22 06:11

Vamkos