On Sat, Mar 27, 2010 at 4:00 AM, Mark Murphy <[email protected]>wrote:
> Neilz wrote: > > Is there a way, to have View elements (TextView, Button, whatever) > > that are not run on the main UI thread? > No. > Windows can run in their own threads, all views inside of a particular window must run in the same thread. The window associated with an Activity is created in the main thread of its process, so that is where its UI runs. You can run windows in other threads if you use Looper to prepare and run a message loop in that thread, and then instantiate and display the window there. SurfaceView also is often used to do UI from a separate thread, by letting the other thread have the Surface to draw into it (either via the Canvas or OpenGL APIs). This also allows you to draw without going through updates, though doesn't allow you to use a regular view hierarchy in the surface. -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

