标签:
1.加载gradle依赖:compile ‘com.github.liuguangqiang.swipeback:library:0.3.0@aar‘
2.在布局上加入布局标签
<com.liuguangqiang.swipeback.SwipeBackLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/swipeBackLayout" android:layout_width="match_parent" android:layout_height="match_parent">3.代码中获取这个对象,设置滑动方向:swipeBackLayout.setDragEdge(SwipeBackLayout.DragEdge.LEFT);
注意:要在主题里进行一些设置,必须包含:否则滑动效果背景有问题
<!-- 窗口的背景颜色 --> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowIsTranslucent">true</item>
标签:
原文地址:http://blog.csdn.net/u013173289/article/details/44725739