标签:android style class blog code java
public static final int SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 0x00001000; + /** + * @hide + * + * NOTE: Flag for {@link #setSystemUiVisibility(int)}: It help user to disable transient + * status bar triggered by gesture + */ + public static final int SYSTEM_UI_FLAG_IMMERSIVE_GESTURE_ISOLATED = 0x00002000;
// monitor for system gestures mSystemGestures = new SystemGesturesPointerEventListener(context, new SystemGesturesPointerEventListener.Callbacks() { @Override public void onSwipeFromTop() { + if (isGestureIsolated()) + return; if (mStatusBar != null) { requestTransientBars(mStatusBar); } } @Override public void onSwipeFromBottom() { + if (isGestureIsolated()) + return; if (mNavigationBar != null && mNavigationBarOnBottom) { requestTransientBars(mNavigationBar); } } @Override public void onSwipeFromRight() { + if (isGestureIsolated()) + return; if (mNavigationBar != null && !mNavigationBarOnBottom) { requestTransientBars(mNavigationBar); } } @Override public void onDebug() { // no-op } + private boolean isGestureIsolated() { + WindowState win = mFocusedWindow != null ? mFocusedWindow : mTopFullscreenOpaqueWindowState; + if (win != null && (win.getSystemUiVisibility() & View.SYSTEM_UI_FLAG_IMMERSIVE_GESTURE_ISOLATED) != 0) + return true; + else + return false; + } });
android4.4上全屏界面实现禁止状态栏下拉,布布扣,bubuko.com
标签:android style class blog code java
原文地址:http://blog.csdn.net/chaihuasong/article/details/31741659