0

i need help how can hide app name without delete name in

string name="app_name"

like this . Thanks for the straightforward answer .

screenshot

hata
  • 11,633
  • 6
  • 46
  • 69

2 Answers2

1

As mentioned previously by another user, you can do it programatically:

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class ActivityName extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // remove title
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main);
    }
}

Or you can do it via your AndroidManifest.xml file:

<activity android:name=".ActivityName"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
</activity>
  • is not working with me thank you for answering i need hide app name like this picture https://i.stack.imgur.com/cWlCo.png – ⴰⴰ ⴰⴰ May 28 '20 at 23:49
0

Try to modify your app's AndroidManifest.xml here:

<application
    android:label="@string/app_name"
    (...)
    >

to below:

<application
    android:label=""
    (...)
    >

Thus you don't need to touch the entry in <string name="app_name">app name</string> in the string resource file.

hata
  • 11,633
  • 6
  • 46
  • 69