Lines Matching refs:Handler
12 <li><a href="#Handler">Define a Handler on the UI Thread</a></li>
41 from a background thread to the UI thread, use a {@link android.os.Handler} that's
44 <h2 id="Handler">Define a Handler on the UI Thread</h2>
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)}
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}.
66 // Defines a Handler object that's attached to the UI thread
67 mHandler = new Handler(Looper.getMainLooper()) {
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
79 * the Handler receives a new Message to process.
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}.
98 the {@link android.os.Handler}. Because {@link android.os.Handler} is running on the UI thread,
154 maintains thread pools and instantiates {@link android.os.Handler}:
193 object and sends it to the {@link android.os.Handler}:
205 * Creates a message for the Handler
218 Finally, {@link android.os.Handler#handleMessage Handler.handleMessage()} checks the status
223 {@link android.os.Handler#handleMessage Handler.handleMessage()} is
230 mHandler = new Handler(Looper.getMainLooper()) {