[Android instance] full screen Implementation of Android 4.0 tablet (1)

Source: Internet
Author: User

From: http://www.eoeandroid.com/thread-246825-1-1.html

 

As the company has recently prepared a full screen demo, it finds that there is no way to achieve real full screen on the tablet. I checked a lot of information and never found an effective method. Because the flat system is also developed by us, we can control everything with the source code ..

Based on the study spirit of mainong, we searched for relevant information and found a feasible but not perfect method. (The seat in the compound bar of the original tablet turns black)

Before starting the project, you must first preview the use of statusbarmanager.

After learning about the usage of statusbarmanager, you can call the relevant code to implement full screen.

?
Code snippet, double-click Copy
01020304050607080910 private
StatusBarManager mStatusBarManager;
        public
static final
int
hideMask = StatusBarManager.DISABLE_EXPAND                       
| StatusBarManager.DISABLE_BACK                       
| StatusBarManager.DISABLE_NOTIFICATION_ICONS                       
| StatusBarManager.DISABLE_NOTIFICATION_ALERTS                       
| StatusBarManager.DISABLE_NOTIFICATION_TICKER                       
| StatusBarManager.DISABLE_SYSTEM_INFO                       
| StatusBarManager.DISABLE_NAVIGATION                       
| StatusBarManager.DISABLE_CLOCK;

Full Screen:

?
Code snippet, double-click Copy
01 mStatusBarManager.disable(hideMask);

Non-full screen:

?
Code snippet, double-click Copy
01      mStatusBarManager.disable(StatusBarManager.DISABLE_NONE);

The above two sentences can be used to display/hide the tablet navigation bar. However, to call the disable method of statusbarmanager, the app signature must be android. UID. system. android. UID. the System-signed application cannot access sdcard-related content. That is to say, you need to separate the explicit and hidden modules of the navigation bar from those of the video playback module. Two APK files are required. A signature is Android. UID. the system is responsible for processing the explicit and hidden information in the navigation bar, and the other APK is used for video playback without the system signature. What I have done is to put the explicit and hidden functions into a service
And call startservice to pass parameters to the service for processing. The attachment contains examples I have written.
It is worth noting that the explicit and hidden navigation bar must be well controlled, otherwise the navigation bar will never be visible...

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.