问题
My app, which has a list view with some scrolling, is performing very well (scrolling at 60fps) on all phones I have tested it with, Nexus One, Nexus 4 and Galaxy S3/4. But the performance is terrible on the Nexus 10, probably around 15fps or so.
I have analysed it to be the Execute part of the graphics pipeline. I have attached a screenshot of a Nexus 10 and a Nexus 4, which are running Android 4.3 and no funny stuff.
The UI is even drawn at the same size, with approx the same amount of pixels. So it is just covering some 20% of the surface on the Nexus 10 and 90% of the surface on the phones. This means that it's not the number of pixels that's the problem. Also, I have checked so that when I scroll, it is only the scrolling area that are updated, not the entire screen.
What I am wondering is, how do I find out what is causing the show Execute phase on the Nexus 10?
Cheers, Mikael
回答1:
I had troubles with scrolling when a lot of NumberPickers where on the screen. So slow!!
"Mihael Grev" advice mainView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
来源:https://stackoverflow.com/questions/19856882/bad-performance-when-scrolling-on-android-4-3-with-nexus-10