如何在android应用程序上显示手势栏?

如何在android应用程序上显示手势栏?,android,webview,navigation,gesture,Android,Webview,Navigation,Gesture,我在我的android应用程序上有一个web视图,我试图只在用户点击应用程序并再次自动隐藏手势栏时显示手势导航,类似于netflix所做的 这是im用来隐藏手势栏的标志,但当您单击应用程序时,它会显示手势栏,并会重新调整应用程序的大小,且手势栏保持可见:/ getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); Activity.xml <RelativeLayou

我在我的android应用程序上有一个web视图,我试图只在用户点击应用程序并再次自动隐藏手势栏时显示手势导航,类似于netflix所做的

这是im用来隐藏手势栏的标志,但当您单击应用程序时,它会显示手势栏,并会重新调整应用程序的大小,且手势栏保持可见:/

   getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Activity.xml

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".MainActivity">


    <WebView
        android:id="@+id/webview"
        android:fitsSystemWindows="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true">

    </WebView>

</RelativeLayout>