Is there any good way of getting the height of the content inside RecyclerView? Considering all items may have different height.
In my scenario I'm using a LinearLayoutManager.
I've searched around and found surprisingly few results for this problem.
RecyclerView.computeVerticalScrollRange
will give an estimation - it averages the height of the rows being currently displayed and multiplies that by the result of getItemCount
computeHorizontalScrollRange
for width if you're orientation is horizontal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With