Android full screen

Source: Internet
Author: User

The Android mobile operating system is an open-source mobile operating system launched by Google based on Linux. We can perform corresponding operations on the simulator to implement various functions to meet user needs. Here we will briefly introduce how to implement full screen in Android.

The implementation of the new version of Android Framework is somewhat different from that of the old version. Here, only the full screen code of the new Android version is provided.

 
 
  1. Package pub. tetris;
  2. Import android. app. Activity;
  3. Import android. OS. Bundle;
  4. Import android. view. Window;
  5. Import android. view. WindowManager;
  6. Public class TetrisActivity extends Activity {
  7. /** Called when the activity is first created .*/
  8. @ Override
  9. Public void onCreate (Bundle savedInstanceState ){
  10. Super. onCreate (savedInstanceState );
  11. /** Full screen settings to hide all decorations in the window */
  12. GetWindow (). setFlags (WindowManager. LayoutParams. FLAG_FULLSCREEN,
  13. WindowManager. LayoutParams. FLAG_FULLSCREEN );
  14. /** The title belongs to the View, so the title is still valid after all the modifiers in the window are hidden */
  15. RequestWindowFeature (Window. FEATURE_NO_TITLE );
  16. TileView tile = new TileView (this );
  17. Tetris tetris = new Tetris ();
  18. Tetris. init (tile );
  19. Thread engine = new Thread (tetris );
  20. SetContentView (tile );
  21. Engine. start ();
  22. }
  23. }

The full screen mode for Android is described here.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.