-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
banner點擊兩側 position錯誤 #13
Comments
用BaseQuickAdapter, setOnItemClickListener(BaseQuickAdapter adapter, View view, int position) 参数position 是 通过 int position = baseViewHolder.getAdapterPosition(); 回调出来的实际轮播数量的position,这个角标没有经过转换= =,因此这里通过banner.getCurrentPager()获取当前显示的position。 现在针对你你的这种情况分析是,点击了两侧的item, 解决方案,参考下哈:
} |
非常感謝 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好 我是用viewpager2版本
我的banner有留左右的影片 也就是一頁三式
但當我點擊非中間的影片時
get的current position仍是中間的
但setOnItemClickListener的position位置會是正確的(可是他不是data實際的position)
請問我想要監聽是否點擊 兩側的影片
要如何取到他的值?
The text was updated successfully, but these errors were encountered: