0

I'm having trouble putting my application fullscreen in Android Lollipop, my code :

public class AoA extends ActionBarActivity {

    protected void oncreate(Bundle savedInstanceState) {
        super.onCreate(SavedInstanceState);

        setupParameters();
    }

    public void setupParameters() {
        GameParameterSingleton.ORIENTATION = GameParameterSingleton.PORTRAIT;

        GameParameterSingleton.SCREEN_HEIGHT= getWindowManager().getDefaultDisplay().getHeight();
        GameParameterSingleton.SCREEN_WIDTH = getWindowManager().getDefaultDisplay().getWidth();

        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
    } 
}

The application works when I do not use fullscreen, Can anyone help me as I leave fulllscreen ? as I take the title of the application?

Melquiades
  • 8,496
  • 1
  • 31
  • 46
Pablo Reis
  • 11
  • 1
  • 2

1 Answers1

1

It seems that in API 21

this.supportRequestWindowFeature(Window.FEATURE_NO_TITLE);

Doesn't work .

Try to Add this to your AndroidManifest.xml file

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

Or add this

this.getActionBar().hide();

in onCreate method after super.onCreate(savedInstanceState);

Saeed Masoumi
  • 8,746
  • 7
  • 57
  • 76