Stella981 Stella981
2年前
CoordinatorLayout + AppBarLayout 的简单使用及解决滑动抖动问题
第一步:导入相应的design包1dependencies{2......3implementation'com.android.support:design:27.1.0'4}第二步:布局文件1<LinearLayoutxmlns:android"http://s
Stella981 Stella981
2年前
CoordinatorLayout,NestedScrollView,AppbarLayout源码解析
NestedScrollView.java1.触摸事件@OverridepublicbooleanonTouchEvent(MotionEventev){initVelocityTrackerIfNotExists();MotionEventvtev
Stella981 Stella981
2年前
Android CoordinatorLayout实现多列表切换并和头布局联动;
注意:不是双列表联动,是多列表和头布局联动;大概就是和饿了么店铺首页类似的布局框架吧,头布局显示时,列表RecyclerView或ScrollView和头布局一起滚动,头布局完全隐藏后列表再去滚动,可以多个列表切换;有空再上图看效果吧;1、主要的布局文件,注释写的很清楚;<?xmlversion"1.0"encoding