How set visibility widget in recyclerView

前端 未结 1 597
醉酒成梦
醉酒成梦 2021-01-17 08:05

I have google maps and cluster data, when i click to some cluster then is showing horizontal recyclerview. I have imageButton which is next or previous button in CardView,

相关标签:
1条回答
  • 2021-01-17 08:47

    Just add holder.nextImageButton.setVisibility(View.VISIBLE); into else statement

    WHY?:
    Because RecyclerView is reusing views. Once the view is out of the screen from top, it is moved to the bottom to represent the next list item. And since you have hidden the button in it, it won't automatically show it, you need to do that manually.

    0 讨论(0)
提交回复
热议问题