Home | History | Annotate | Download | only in multiple-threads

Lines Matching full:link

32     {@link java.util.concurrent.ThreadPoolExecutor}. This final lesson shows you how to send data
37 Every app has its own special thread that runs UI objects such as {@link android.view.View}
41 from a background thread to the UI thread, use a {@link android.os.Handler} that's
46 {@link android.os.Handler} is part of the Android system's framework for managing threads. A
47 {@link android.os.Handler} object receives messages and runs code to handle the messages.
48 Normally, you create a {@link android.os.Handler} for a new thread, but you can
49 also create a {@link android.os.Handler} that's connected to an existing thread.
50 When you connect a {@link android.os.Handler} to your UI thread, the code that handles messages
54 Instantiate the {@link android.os.Handler} object in the constructor for the class that
56 thread by instantiating it with the {@link android.os.Handler#Handler(Looper) Handler(Looper)}
57 constructor. This constructor uses a {@link android.os.Looper} object, which is another part of
59 {@link android.os.Handler} based on a particular {@link android.os.Looper} instance, the
60 {@link android.os.Handler} runs on the same thread as the {@link android.os.Looper}.
71 Inside the {@link android.os.Handler}, override the {@link android.os.Handler#handleMessage
73 for a thread it's managing; all of the {@link android.os.Handler} objects for a particular
90 The next section shows how to tell the {@link android.os.Handler} to move data.
96 task object and a status code to the object that instantiated the {@link android.os.Handler}.
97 In this object, send a {@link android.os.Message} containing the status and the task object to
98 the {@link android.os.Handler}. Because {@link android.os.Handler} is running on the UI thread,
103 For example, here's a {@link java.lang.Runnable}, running on a background thread, that decodes a
104 {@link android.graphics.Bitmap} and stores it in its parent object <code>PhotoTask</code>.
105 The {@link java.lang.Runnable} also stores the status code <code>DECODE_STATE_COMPLETED</code>.
140 <code>PhotoTask</code> also contains a handle to the {@link android.widget.ImageView} that
141 displays the {@link android.graphics.Bitmap}. Even though references to
142 the {@link android.graphics.Bitmap} and {@link android.widget.ImageView} are in the same object,
143 you can't assign the {@link android.graphics.Bitmap} to the {@link android.widget.ImageView},
152 the decoded data and the {@link android.view.View} object that will show the data. It receives
154 maintains thread pools and instantiates {@link android.os.Handler}:
192 <code>TASK_COMPLETE</code>, creates a {@link android.os.Message} containing the state and task
193 object and sends it to the {@link android.os.Handler}:
218 Finally, {@link android.os.Handler#handleMessage Handler.handleMessage()} checks the status
219 code for each incoming {@link android.os.Message}. If the status code is
221 in the {@link android.os.Message} contains both a {@link android.graphics.Bitmap} and an
222 {@link android.widget.ImageView}. Because
223 {@link android.os.Handler#handleMessage Handler.handleMessage()} is
224 running on the UI thread, it can safely move the {@link android.graphics.Bitmap} to the
225 {@link android.widget.ImageView}: