recycleview三种布局
2017-12-11 11:37
78 查看
线性布局
LinearLayoutManager manager =
new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL,false);
瀑布流
LinearLayoutManager manager =
new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL,false);
瀑布流
StaggeredGridLayoutManager manager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
Random random = new Random(); int i = random.nextInt(300) + 200; ViewGroup.LayoutParams layoutParams = holder.itemView.getLayoutParams(); layoutParams.height = i;
网格布局
GridLayoutManager manager = new GridLayoutManager(getContext(),2);
相关文章推荐
- android开发游记:RecycleView 实现复杂首页布局三种方式
- Recycleview实现复杂页面 三种以上布局 瀑布流 多布局 scrollview嵌套recyclerView 显示不全 滑动冲突 之进阶终极篇
- android开发游记:RecycleView 实现复杂首页布局三种方式
- android开发游记:RecycleView 实现复杂首页布局三种方式
- android开发游记:RecycleView 实现复杂首页布局三种方式
- Recycleview实现复杂页面三种以上布局 瀑布流多布 scrollview嵌套recyclerView 显示不全滑动冲突
- RecycleView 实现复杂首页布局三种方式
- android开发游记:RecycleView 实现复杂首页布局三种方式
- RecycleView 实现复杂首页布局三种方式
- android开发游记:RecycleView 实现复杂首页布局三种方式
- Viewpager模仿微信主布局的三种方式 ViewPager,Fragment,ViewPager+FragmentPagerAdapter
- RecycleView点击切换布局
- 快速实现RecycleView的网格和瀑布流布局添加头部(尾部原理一样,故略之)
- 手把手教你给RecycleView添加头布局和尾布局
- 安卓复杂滑动案例 自定义behavior源码分析 实现头布局图片的缩放透明度变化,RecycleView的滑动布局,坐标变化
- 卡片式布局以及RecycleView的用法
- RecycleView 的多条目布局
- 安卓复杂滑动案例 自定义behavior源码分析 实现头布局图片的缩放透明度变化,RecycleView的滑动布局,坐标变化
- Android RecycleView 的多布局
- Android Studio第三十二期 - RecycleView不同布局适配器写法