overbet13
overbet13

Reputation: 1674

Efficient ListView in android

What is the best way of constructing a ListView that uses the least memory possible? This is important, because I met a few implementations and most of them is lagging when I scroll the ListView on low-end devices, but I saw a few apps, where the scroll is very smooth, even on low-end devices. How can it be done? What is the most efficient way from a memory usage point of view to construct such a ListView?

Upvotes: 5

Views: 5313

Answers (3)

Chirag
Chirag

Reputation: 56925

Look at this code with description to increase the efficiency of lisview.

Keep in mind when you have lots of data to show in listview then at a time do not load all data . First load 2o data then load another when listview reaches at end.

This is also another way to increase the efficiency of listview.

Upvotes: 1

Uriel Frankel
Uriel Frankel

Reputation: 14612

You will have to use the ViewHolder pattern.

Upvotes: 1

biegleux
biegleux

Reputation: 13247

Upvotes: 7

Related Questions