Home > Mobile >  Android7.1 not full screen in setting interface
Android7.1 not full screen in setting interface

Time:10-02

We need to modify a function: through radio for dynamic show/hide status bar and the function of the navigation bar, now found hiding in the setting interface when the status bar at the top with a piece of black can't hide, I use the eclipse view layout is found to be the android: id/statusBarBackground the id, the package name is com. Android Settings, the class name is android. View. The view, the in the Settings and SystemUI class is not found, could you tell me how to modify? Now found in the alarm clock interface also has this problem, it should not be in a Setting or SystemUI modification, excuse me, what is the solution?

 
The static final String TAG_SHOW="1";
The static final String TAG_HIDE="0";
Private static final String INTENT_BAR_ACTION_SHOW="BCD. Intent. Action. BAR_SHOW";
Private static final String INTENT_BAR_ACTION_HIDE="BCD. Intent. Action. BAR_HIDE";

,,,

Private void removeNavigationBar () {
If (DEBUG)
Log. I (" wangp ", "=========removeNavigationBar=====" + mNavigationBarView);
If (mNavigationBarView==null)
return;
If (mNavigationBarView!=null) {
MWindowManager. RemoveViewImmediate (mNavigationBarView);
MNavigationBarView=null;
}
}
Private BroadcastReceiver mShowOrHideStatusBarReceiver=new BroadcastReceiver () {
Public void onReceive (Context Context, Intent Intent) {
If (DEBUG)
The v (TAG, "onReceive:" + intent);
The String action=intent. GetAction ();
If (INTENT_BAR_ACTION_SHOW equals (action)) {
//flagShow=true;
Settings. System. PutInt (mContext getContentResolver (),
"Show_statusbar", 1);
//show
MStatusBarWindow. SetVisibility (the VISIBLE);
MStatusBarView. SetVisibility (the VISIBLE);
InflateNavigationBarView (context);
AddNavigationBar ();
} else if (INTENT_BAR_ACTION_HIDE equals (action)) {
//flagShow=false;
Settings. System. PutInt (mContext getContentResolver (),
"Show_statusbar", 0);
//hide
MStatusBarWindow. SetVisibility (View. GONE);
MStatusBarView. SetVisibility (View. GONE);
RemoveNavigationBar ();
}
}
};

,,,



CodePudding user response:

Above Android5.0 messing around, don't need to code the following oneself choose

Full screen, the status bar and navigation translucent (api> 19)



Full screen, status bar, and the navigation bar completely transparent (api> 21)



GetWindow (). GetDecorView (.) setSystemUiVisibility (the SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | the SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | the SYSTEM_UI_FLAG_LAYOUT_STABLE);

CodePudding user response:

reference 1/f, wang can reply:
above Android5.0 messing around, don't need to code the following oneself choose

Full screen, the status bar and navigation translucent (api> 19)



Full screen, status bar, and the navigation bar completely transparent (api> 21)



GetWindow (). GetDecorView (.) setSystemUiVisibility (the SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | the SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | the SYSTEM_UI_FLAG_LAYOUT_STABLE);



Writing in the theme

CodePudding user response:

refer to the second floor can reply wang:
Quote: refer to 1st floor can reply wang:

Above Android5.0 messing around, don't need to code the following oneself choose

Full screen, the status bar and navigation translucent (api> 19)



Full screen, status bar, and the navigation bar completely transparent (api> 21)



GetWindow (). GetDecorView (.) setSystemUiVisibility (the SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | the SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | the SYSTEM_UI_FLAG_LAYOUT_STABLE);



Write in the theme of

The elder brothers thanks, but I need to do is dynamic hide/show, you didn't effect the method I tried

CodePudding user response:

Each property has a corresponding code set, are you sure no effect, I used to test pass

CodePudding user response:

references 4 floor wang can reply:
each attribute has a corresponding code set, are you sure no effect, I test pass before

I use my mobile 5.1 is effective, but the company did not respond to a 7.1 system test the above, can you leave a contact number?
  • Related