Lines Matching full:link
33 This lesson shows you how to implement a {@link java.lang.Runnable} class, which runs the code
34 in its {@link java.lang.Runnable#run Runnable.run()} method on a separate thread. You can also
35 pass a {@link java.lang.Runnable} to another object that can then attach it to a thread and
36 run it. One or more {@link java.lang.Runnable} objects that perform a particular operation are
40 {@link java.lang.Thread} and {@link java.lang.Runnable} are basic classes that, on their own,
42 {@link android.os.HandlerThread}, {@link android.os.AsyncTask}, and
43 {@link android.app.IntentService}. {@link java.lang.Thread} and {@link java.lang.Runnable} are
44 also the basis of the class {@link java.util.concurrent.ThreadPoolExecutor}. This class
49 Implementing a class that implements {@link java.lang.Runnable} is straightforward. For example:
66 In the class, the {@link java.lang.Runnable#run Runnable.run()} method contains the
67 code that's executed. Usually, anything is allowable in a {@link java.lang.Runnable}. Remember,
68 though, that the {@link java.lang.Runnable} won't be running on the UI thread, so it can't
69 directly modify UI objects such as {@link android.view.View} objects. To communicate with
74 At the beginning of the {@link java.lang.Runnable#run run()} method, set the thread to use
76 {@link android.os.Process#setThreadPriority Process.setThreadPriority()} with
77 {@link android.os.Process#THREAD_PRIORITY_BACKGROUND}. This approach reduces
78 resource competition between the {@link java.lang.Runnable} object's thread and the UI
82 You should also store a reference to the {@link java.lang.Runnable} object's
83 {@link java.lang.Thread} in the {@link java.lang.Runnable} itself, by calling
84 {@link java.lang.Thread#currentThread() Thread.currentThread()}.
87 The following snippet shows how to set up the {@link java.lang.Runnable#run run()} method: