Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimize complex layout

I develop an audio player for Android and in my browse album activity I have a performance problem: lot of lag on scroll.

In this image is my layout representation :enter image description here

It's a ListView which display a row; a row contains 5 albums grouped by artist.

Each different color is a different layout file. And each file is managed by an Adapter.

In the album (orange color), I don't use compoundDrawable on the TextView because I have ImageView lazy loading and I don't understand how I can make this lazy loading on textview compoundDrawable.

If you need, I can post all layout files.

like image 466
flagadajones Avatar asked Oct 22 '22 23:10

flagadajones


2 Answers

After many optimizations, i change my layout like this

My New Layout

like image 189
flagadajones Avatar answered Nov 03 '22 01:11

flagadajones


Have you read this article?

Android Performance Case Study

It may help in your case but not knowing more about how you are setting up the view, it's just a suggestion.

like image 22
Chuck D Avatar answered Nov 03 '22 03:11

Chuck D