Andriod full screen processing (Video Player)

Source: Internet
Author: User

Andriod full screen processing (Video Player)
1. Introduction

In Android applications, some require full screen, excluding the Status Bar (System Status Bar), the title Bar (ActionBar), and the Navigation Bar (Navigation Bar ), this status is the Immpresion mode defined in Google API. this mode is often used by game applications.

In addition, some applications need to switch between full-screen and non-full-screen modes, such as video players.


2. UI Flag

(1) display StatusBar and Navigation Bar


        mShowFlags =                View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION                        | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;      mAnchorView.setSystemUiVisibility(mShowFlags);

(2) Hide StatusBar and Navigation Bar



        mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN                | View.SYSTEM_UI_FLAG_FULLSCREEN                | View.SYSTEM_UI_FLAG_IMMERSIVE                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;       mAnchorView.setSystemUiVisibility(mHideFlags);

3. ActionBar OverLay


Set the ActionBar to the upper layer of the View.



        requestWindowFeature(Window.FEATURE_ACTION_BAR);        requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);



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: 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.