github:
https://github.com/anymyna/ui
步骤:
1、Module build.gradle 引入SwipeBackLayout
implementation 'me.imid.swipebacklayout.lib:library:1.1.0'
2、theme增加android:windowIsTranslucent
<item name="android:windowIsTranslucent">true</item>
3、Activity 继承 SwipeBackActivity:
4、 getSwipeBackLayout()设置SwipeBackLayout
getSwipeBackLayout().setEdgeTrackingEnabled(SwipeBackLayout.EDGE_LEFT);
参考:
https://github.com/ikew0ng/SwipeBackLayout
本文详细介绍了如何在Android应用中实现滑动返回功能。通过在Module build.gradle中引入SwipeBackLayout库,修改主题设置,使Activity继承SwipeBackActivity,并设置SwipeBackLayout的边缘跟踪,即可轻松实现滑动返回效果。

550

被折叠的 条评论
为什么被折叠?



