SinFrancis wrote:
> as subject ; How can i create thread in Android???
> Please give more code ! Thanks!
The same way you create threads in any Java program:
new Thread(new Runnable() {
public void run() {
// do stuff that doesn't touch the UI here
}
}).start();
The catch is that background threads cannot perform operations on an
activity's Views. You should either use a Handler or View#post() or
Activity#runOnUiThread() to arrange for UI updates to occur on the main
UI thread.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---