Abx
Abx

Reputation: 2882

Optimized List view with 1k object list

I was wondering if there is any optimized way to create an adapter that holds more than 1k object in it. I have tried the following but still the results were not promising .

A.View holder pattern-It helped but when the object size increased it started have issues

B.Note: I could have used a paginated api which passes a defined number of objects but I annot have paginated Api in my scenerio.

C.My list do have images in it but I have taken care of that.Its not a problem now.

Let me know of any new ways to achieve a adapter that can have a large number of object list in it without any issues.

Upvotes: 4

Views: 206

Answers (1)

Linh
Linh

Reputation: 60923

As far as I know, I use some structure below

  • Use ViewHolder
  • Do not create new object if you not use
  • Optimizing Layout Hierarchies

https://developer.android.com/training/improving-layouts/optimizing-layout.html

  • Prevent Overdraw

https://developer.android.com/tools/performance/debug-gpu-overdraw/index.html

Upvotes: 3

Related Questions