What is this for? requestWindowFeature(Window.FEATURE_NO_TITLE);

Asked

Viewed 206 times

0

I was studying a webservice for android consume and I came across this::

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE); 
    setContentView(R.layout.loginuser);

    }

Why should I use
requestWindowFeature(Window.FEATURE_NO_TITLE); ?

2 answers

1

To remove the status bar from android. Some apps like games do this to stay in full screen. Or to make the Slash screen with the logo alone on the screen.

1

I usually use this when I want to create a custom Alertdialog. Then, this code to remove that title bar. Because if I don’t add that code, and the title bar gets the white background.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.