Skip to content

Instantly share code, notes, and snippets.

@mahdimortazavi
Created June 22, 2016 20:50
Show Gist options
  • Save mahdimortazavi/30adee202e53bc6b98ede957d5ed50ad to your computer and use it in GitHub Desktop.
Save mahdimortazavi/30adee202e53bc6b98ede957d5ed50ad to your computer and use it in GitHub Desktop.
Fullscreen Activity in Android
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);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment