----- Original Message ----- From: Miguel Morales
To: [email protected]
Sent: Monday, June 06, 2011 8:24 PM
Subject: Re: [android-developers] login form




2) Separate your UI code from your network code, otherwise your app will get an Application Not Responding dialog error.




I am not sure what you mean. I presume you mean I need a new thread for parts of it but where would I start and end it?



The basic rule when using a thread or background process is whenever some process may take longer than half a second, do it in the background. So, in your case in your background thread you would have all the http network code. Then when you're finished tell your UI thread to update the edit text fields accordingly.

You NEED to read this: http://developer.android.com/resources/articles/painless-threading.html






I had a read but I was still a bit confused. Ok so all the http posting bits need to be a seperate thread. It is a bit of a steep learning curve but I am getting there




Pam
--
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

Reply via email to