RecylerView具有固定的第一列作为首标 [英] RecylerView with a fixed first row as header

查看:222
本文介绍了RecylerView具有固定的第一列作为首标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个固定的第一排,这应作为标题扮演一个回收视图。另外,我怎么能prevent它与其他行元素滚动?

I would like to create a recycler view with a fixed first row, which should act as the header. Also ,how can I prevent it from scrolling with other row elements ?

推荐答案

不要把你的头固定在 RecyclerView 。在包裹 RecyclerView A 垂直 的LinearLayout ,与你的固定头上面。

Don't put your fixed header in the RecyclerView. Wrap the RecyclerView in a vertical LinearLayout, with your fixed header above it.

这篇关于RecylerView具有固定的第一列作为首标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆