实现Android 滑动退出Activity的功能
android向右滑动,退出activity
//右滑删除 compile 'com.jude:swipebackhelper:3.1.2'
 然后在Baseactivity中添加代码:
实现代码:
SwipeBackHelper.onCreate(this); 
    SwipeBackHelper.getCurrentPage(this) 
        .setSwipeBackEnable(true) 
        .setSwipeSensitivity(0.5f) 
        .setSwipeRelateEnable(true) 
        .setSwipeRelateOffset(300); 
 
@Override 
  protected void onDestroy() { 
    SwipeBackHelper.onDestroy(this); 
  
    super.onDestroy(); 
  } 
以上就是Android 滑动退出应用程序的实例,如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!