Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to the link you provided you have to start the animation in a separate thread. In Java you do that by implementing the <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Runnable.html" rel="nofollow">Runnable</a> interface and start it with</p> <pre><code>Thread t = new Thread(new MyRunnable()); // MyRunnable inherits Runnable t.start(); </code></pre> <p>you can also write the code like this</p> <pre><code>new Thread(new Runnable() { public void run(){ // some code that runs outside the ui thread. } }).start(); </code></pre> <p>if you don't want to implement a whole new class. The latter is of course not that pretty but if you're making a small project it can be nice to know about.</p> <p>Have you tried it this way or have you started your thread in another way?</p> <p>Please also read <a href="http://developer.android.com/resources/articles/painless-threading.html" rel="nofollow">Painless Threading</a> that goes over what possibilities you have to perform actions outside the ui thread and how to post methods that runs on the ui thread from your own threads.</p> <hr> <p><em>Edit:</em> After reviewing the link you posted you have to wait a while before starting your thread, probably until onCreate is complete. According to <a href="http://developer.android.com/reference/android/app/Activity.html" rel="nofollow">the flowchart on this page</a> you should be able to start your animation later, for instance in the onResume call. Have you tried starting it in a method called after onCreate?</p> <p>You should only <em>create</em> things in onCreate, and "start" them in onStart or onResume.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload