N
N
newdancer2015-08-22 10:59:25
Java
newdancer, 2015-08-22 10:59:25

How to make animation start when the main thread is waiting for it to run?

How to make animation start when the main thread is waiting for it to run? Implementation via The join() method failed. Since I understand it is impossible to call the same thread. an error pops up: java.lang.IllegalThreadStateException: Thread already started
It is also important that all animations must be performed in turn

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Berkov, 2015-08-22
@konstantin_berkow

If we are talking about Android, use ObjectAnimator'om and AnimatorSet'om.

B
belozerow, 2015-08-22
@belozerow

Write the problem as a whole, judging by the description you are solving it incorrectly. The main thread cannot wait for the animation to complete, it draws it.
As written above, AnimatorSet will make it possible to perform animations in turn. addListener will add a callback to the end of the animation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question