So I am doing the typical listview viewholder pattern. I am also setting images in a background thread and disabling loading images if the user flings the list.
On older devices (Galaxy s, htc desire, Original Google nexus) my listview works perfectly, no lag at all, even when i scroll/fling the listview. However, on my newer devices (Galaxy S3, Nexus) it is super laggy.
I am performing quite a bit of if/else conditions to setvisibility on certain views. Can this be the root cause? If so why would it be only affecting newer devices?
Hard to say without seeing your code. Try hooking the device up to adb, open DDMS and press the method profiling button (icon with 3 arrows and a red dot), then start scrolling a bunch for a few seconds in your app. Press the stop profiling button (same button) and Traceview will open and you see what is using up all the CPU time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With