简体   繁体   English

使用 gridlayoutmanager 在 recyclerview 中查看位置

[英]View position in recyclerview with gridlayoutmanager

I am using a recyclerview with gridlayoutmanager with 3 columns.我正在使用带有 3 列的 gridlayoutmanager 的 recyclerview。 How can I know in which column my view is?我怎么知道我的视图在哪一列?

我认为这只是:

column = position % 3

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用GridLayoutManager在RecyclerView中自定义视图/行 - Custom view/row in RecyclerView with GridLayoutManager 带有GridLayoutManager的RecyclerView插入项目的位置错误 - RecyclerView with GridLayoutManager insert item wrong position GridLayoutManager(RecyclerView)中的项目更改滚动Android上的位置 - items in GridLayoutManager (RecyclerView) changes position on scroll android Android:RecyclerView GridLayoutManager-恢复滚动位置无法正常工作 - Android: RecyclerView GridLayoutManager - Restoring scroll position doesn't work properly 为RecyclerView和GridLayoutManager设置onclick时如何添加Toast位置? - How to add Toast position when set onclick for a RecyclerView and GridLayoutManager? 滚动时Recyclerview GridlayoutManager OnBindViewHolder的位置和getAdapterPosition()错误 - Recyclerview GridlayoutManager OnBindViewHolder position & getAdapterPosition() is wrong when scrolling 具有多种视图类型的RecyclerView GridLayoutManager,Viewholder强制转换为异常 - RecyclerView GridLayoutManager with multiple view type, Viewholder cast Exception 如何为具有父视图和子视图的RecyclerView设置GridLayoutManager - How to set the GridLayoutManager for the RecyclerView Having the Parent & Child View differently 使用自定义GridlayoutManager android的Recyclerview - Recyclerview with custom GridlayoutManager android RecyclerView中的GridLayoutManager 3列 - GridLayoutManager 3 columns in RecyclerView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM