1. NavigationBar导航栏上滑解决方案
代码路径:frameworks/base/services/core/java/com/android/server/wm/DisplayPolicy.java
注:SystemUI Navigationbar非隐藏状态可上滑,如有隐藏导航栏需求,height设置为1dp。
@Overridepublic void onSwipeFromBottom() {if (mNavigationBar != null && mNavigationBarPosition == NAV_BAR_BOTTOM) {// Log.d("ljx", "=========onSwipeFromBottom=========");// 导航栏上滑相关功能需求代码写这里。requestTransientBars(mNavigationBar);}}
2. 举例NavigationBar导航栏上滑上滑返回Launcher
代码路径:frameworks/base/services/core/java/com/android/server/wm/DisplayPolicy.java
@Overridepublic void onSwipeFromBottom() {if (mNavigationBar != null && mNavigationBarPosition == NAV_BAR_BOTTOM) {+/**add by ljx@date for re