0

I'm creating an android book that use data from database(sqlite) and has six season. my data is about 1MB and for loading data on listview is slow.I wanna to put a dynamic listview for my project that load 10 item on listview with scrolling each time. please help me

2
  • 2
    what have you done so far for this in code? Commented Jul 29, 2016 at 7:56
  • If you want to load 10 items each time, you just need to get 10 data from database and then notify. I think it's mostly depends on your app's logic. Commented Jul 29, 2016 at 7:59

1 Answer 1

1

ListView actually keep in memory items only visible for users - check it for better understanding - http://android.amberfog.com/?p=296.

I think you are talking about lazy loading data from sqlite, so just fetch next 20 (or whatever) items when user scrolled to last item.

I recommend you to switch to RecyclerView. Please check that article for implementation of endless scrolling with RecyclerView.

Sign up to request clarification or add additional context in comments.

1 Comment

@mohsen1993 I think I cover both cases in my answer. If you still have question, feel free to ask. If no - close your question with marking that answer as a right one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.