Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to find out how many items in a list view are showing?

I want to do a particular action on the items of the listview that the user can see without scrolling. Is there anyway to get the amount of items shown, or is there any other way of approaching this?

like image 656
NotACleverMan Avatar asked Nov 30 '22 08:11

NotACleverMan


1 Answers

I dont know what exact is your requirement but to know the no list items that are currently visible

ListView.getFirstVisiblePosition();     
ListView.getLastVisiblePosition();
like image 135
ingsaurabh Avatar answered Dec 05 '22 01:12

ingsaurabh