Android set request window feature( Window.FEATURE_ NO_ Title) invalid solution

Reprint please indicate the source:

general app has a demand to hide the Android default Title bar, is usually used before setConvertView call requestWindowFeature (Window. FEATURE_NO_TITLE), after can sometimes find call this line of code has no effect, Very depressed.
through observation, before the Activity is to inherit the Activity, so is valid, and I am AppCompatActivity inherited, so can’t hide.
1. Let xxxActivity inherit the Activity
2. Inherit AppCompatActivity and call it in the onCreate method

if (getSupportActionBar() != null){

And then we’re done.

Read More: