Y
Y
yury_borisov72017-09-23 16:30:16
Android
yury_borisov7, 2017-09-23 16:30:16

How to add big data to lareout?

Hello everyone
Here is a question
I send a request to the server via api (AsyncTask) I receive
data, create my components and then add it to the lareout and add the same lareout to the main
one So it sometimes hangs, a couple of seconds 1-2 just when adding, about 15 elements are added + they are heavy (a couple of textView pictures and a couple of buttons and such components at a time 15 pieces)
Question: how to do it all so that it doesn’t hang but smoothly added? so that the user does not notice anything and continues to work further, otherwise the hang for 1-2 seconds does not suit. Are there any options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rainmatic, 2017-09-24
@rainmatic

Read about View optimization, for example. In general, you seem to be heavily loading the main (UI) thread, so you need to either unload it or optimize the creation of the CustomView (see the example at the link).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question