在可扩展的RecyclerView中扩展最后一个视图的可见性 [英] Visibility of expanding last view in the expandable RecyclerView
问题描述
我希望单击最后一个可扩展项时的内容完全可见,现在发生的情况意味着当我单击最后一个可扩展项时它会向下扩展,但是我需要手动再次向上滚动以查看其中的内容展开的项目.最后一个展开的项目如何完全可见. 我正在使用Recyclerview.
I want the things in the last expandable item to be fully visible when it is clicked,Now what is happening means when I click on last item it expands down, but I manually need to scroll up again to see the the things inside the expanded item.How can the last expandable item be fully visible. I am using Recyclerview.
推荐答案
我已经找到了想要的解决方案,我使用了
I have found the solution which I wanted, I used
recyclerView.smoothScrollToPosition(selectedPosition);
recyclerView.smoothScrollToPosition(selectedPosition);
设置适配器后.因此,单击后,最后一个可扩展项中的内容将完全可见.
after setting the adapter. So now the things in the last expandable item is fully visible when it is clicked.
这篇关于在可扩展的RecyclerView中扩展最后一个视图的可见性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!