Google tag

Pages

How to set android Full Screen

import android.view.Window;
import android.view.WindowManager;

@Overridepublic 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);
}

Second Option :
AndroidManifest.xml
Edit the theme.
android:name="MyActivity"
          android:label="@string/app_name"
          android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen">

No comments: