Performance issues in a NumberPicker

2

I have a NumberPicker that loads approximately 6000 records. When you try it in api > 20 your answer is not more than 2 seconds but when you test it in a api < 19 your answer is 15 seconds or more.

I want to know if there is any way to improve the response time of api < 19 thank you very much.

    
asked by diego alejandro franco osorio 20.04.2016 в 15:46
source

1 answer

1

Try to use:

mainView.setLayerType(View.LAYER_TYPE_HARDWARE, null);

And this

android:layerType="hardware"

That forces hardware rendering and forces the GPU to do the drawing work. You'll already tell us if it worked for you or not.

    
answered by 01.06.2016 в 16:08