在项目中使用了CoordinatorLayout布局做一个上滑隐藏的效果
activity中布局 CoordinatorLayout + AppBarLayout + Viewpager
fragment中EditText + SmartRefreshLayout + RecyclerView
问题在于,左右滑动后,布局整体向上滑动(也就是CoordinatorLayout 自动折叠了)
折腾了半天,才知道问题出现在EditText 上,所以在EditText父控制上加入
android:focusable="true"
android:focusableInTouchMode="true"
使其不获取焦点
问题解决了