I am developing an android application for API level 10 (2.3.3). In my application, one seek bar is available which has values from 0-25.
My problem is when I progress on seekbar, I am updating multiple views. As view can be updated from UI thread only, all the views update synchronously means one by one. Means I can see that view is updating. My updates doesn’t require any background work.
So my question is Is there any way to update the views simultaneously? Means for example if I have 15 views, can I update all at the same time like by spanning some thread?
Thanks in advance.
It’s not possible.
Let’s consider that you actually could update UI components from outside the UI thread (which you can’t), even that wouldn’t be simultaneous.
Let’s say thread 1 makes 100 operations t1o1, t1o2, …, t1o100 and thread 2 makes t2o1, t2o2, …, t2o100.
If you run both of them they will be executed in an order similar to:
t1o1
t2o1
t1o2
t1o3
t2o2
….
Both threads are running simultaneously but no 2 operations are being executed at the same time.