AndroidNavigation A library managing nested Fragment, translucent StatusBar and Toolbar for Android. You could use it as a single Activity Architecture Component. This is also the subproject of react-native-navigation-hybrid. Download demo apk 特性 一行
前言
该控件的优点:
1.无论是在RecyclerView,ListView,还是LinearLayout等,只要是ViewGroup用该控件都能实现侧滑。
2.控件的手势滑动冲突已解决,不会出现嵌套到ScrollView等控件出现滑动不流畅的情况
3.控件使用简单,只需要在xml外套一层该控件就好了,秒接入
4.点击事件很方便,原来什么写法就什么写法
1.效果图
2.使用方式其实挺简单的,在设计的时候,就是想着怎么简单怎么来
2.1引入库:
Step 1. Add it in your
重写子pagerview的dispatchTouchEvent方法,在返回前添加一句getParent().requestDisallowInterceptTouchEvent(true)中断掉事件的传递,类如下
public class SupperViewPager extends ViewPager {
private int screenWidth;//屏幕宽度
public SupperViewPager(Context context) {
super(context);