multithreading - Asynchronous view manipulation android -


I have a little problem, I want to spend a lot of time now. I hope you can help me. OK, I have an activity witch load content out of the data base in the background, it gives asynchrony and modifies my data model. Now I'm exploring a good way to inform the administrator about updating the updates. I use the data changer method but I got an exception.

Android does not allow modification of one view from another thread. In my opinion, this is a basic functionality so there should be a way to implement such functionality.

Can you give me an indication

I also look at the content supervisor class. But I do not think the correct one

thanks

Please enter your activity Provide some code snippet from code>. If you are using asynkTask which is the best method of background processing on data, you should use the onPostExecute () method to update your code, because doInBackground () runs on a background thread, not on UIThread.

You must declare a solution in your activity and post a new runner / in that handler when you use the UI Something like this:

  mHandler.post {New Runnabel} {@Override Public Zero () {MAdapter.notifyDataSetChanged ();}});   

But this is somehow "hacked" and I do not recommend using it. The best way is to use it.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -