Search code examples
androidlistviewscrollvisible

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?


Solution

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

    ListView.getFirstVisiblePosition();     
    ListView.getLastVisiblePosition();