0

Currently I'm using RecyclerView for displaying a list. In RecyclerView, I am able to find the last completely visible item position using LayoutManager.

So my question is: In ListView Is there any possible way to get completely visible item position?

 mLinearLayoutManager.findLastCompletelyVisibleItemPosition();
wake-0
  • 3,918
  • 5
  • 28
  • 45
Arunkumar
  • 186
  • 1
  • 11
  • Your question is unclear, Didn't get it. Elaborate it more or post the code snippet which you tried. – Onkar Nene Jul 11 '16 at 10:16
  • Currently I'm using recyclerview for displaying list. In recyclerview I can able to find the last completely visible item position using layout manager. So my question is, In list view Is there any possible way to get completely visible item position? "mLinearLayoutManager.findLastCompletelyVisibleItemPosition();" – Arunkumar Jul 11 '16 at 10:24
  • what do u mean "get completely visible item position" ??? Means you want position of all items in list? right? – Onkar Nene Jul 11 '16 at 10:41
  • No....i want "findLastCompletelyVisibleItemPosition" count from listview like recycler view mLinearLayoutManager.findLastCompletelyVisibleItemPosition(); – Arunkumar Jul 11 '16 at 10:45
  • **Check this** - http://stackoverflow.com/questions/24989218/get-visible-items-in-recyclerview Hope it will help! – Onkar Nene Jul 11 '16 at 10:46
  • But i am using listview only not a RecyclerView... please help – Arunkumar Jul 11 '16 at 10:47
  • You said **"I'm using RecyclerView for displaying list"**. Check your question. Btw listview and recyclerview is not different. RecyclerView is just improved version of ListView. – Onkar Nene Jul 11 '16 at 10:50
  • ok..... But is it possible to get a "findLastCompletelyVisibleItemPosition" from listview. i am using Listview only.. sorry for the question mistakes....please help... i am struck – Arunkumar Jul 11 '16 at 10:52
  • Yes. Check the link above. The answer in link is also applicable to listview. Just try it. – Onkar Nene Jul 11 '16 at 10:57
  • i am new for this... so please explain how to do... – Arunkumar Jul 11 '16 at 11:02
  • i having error in "listview.getLayoutManager();"... And cant able to use LinearLayoutManger for listview... – Arunkumar Jul 11 '16 at 11:09

0 Answers0