實(shí)現(xiàn)Android 滑動(dòng)退出Activity的功能
android向右滑動(dòng),退出activity
//右滑刪除 compile 'com.jude:swipebackhelper:3.1.2'
然后在Baseactivity中添加代碼:
實(shí)現(xiàn)代碼:
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 滑動(dòng)退出應(yīng)用程序的實(shí)例,如有疑問(wèn)請(qǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!
新聞熱點(diǎn)
疑難解答
圖片精選