Android set up full screen code sharing
- 2020-06-07 05:17:11
- OfStack
Very simple 1 piece of code to set up android's full screen
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Hide the title bar (the name of the application)
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
// Hide the status bar section (battery ICONS and so on) 1 Starting part)
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULL_SCREEN, WindowManager.LayoutParams.FLAG_FULL_SCREEN);
setContentView(new MyView(this));
}
}