How to detect full screen gesture mode in android Q

走远了吗. 提交于 2019-12-03 01:05:07

According to docs, you can get area of gesture space using getSystemGestureInsets(): https://developer.android.com/reference/android/view/WindowInsets.html#getSystemGestureInsets()

If it's zero, then it's disabled

    ViewCompat.setOnApplyWindowInsetsListener(view, (v, insets) -> {
        if (insets.getSystemGestureInsets().bottom == 0 
            && insets.getSystemGestureInsets().left == 0
            && insets.getSystemGestureInsets().right == 0) 
        {
            //gestures enabled
        }
        return insets.consumeSystemWindowInsets();
    });

However, I don't have device with Android Q, and I might be wrong

I've found it in this article: https://developer.android.com/preview/features/gesturalnav

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!