Vou seguir o conselho do Javanator, ele parece saber do que esta falando:
I also faced the same. And as the most accepted answer suggests making change to adapter data from UI Thread can solve the issue. That will work but is a quick and easy solution but not the best one.
As you can see for a normal case. Updating data adapter from background thread and calling notifyDataSetChanged in UI thread works.
This illegalStateException arises when a ui thread is updating the view and another background thread changes the data again. That moment causes this issue.
So if you will synchronize all the code which is changing the adapter data and making notifydatasetchange call. This issue should be gone. As gone for me and i am still updating the data from background thread."
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comentários:
Postar um comentário