I have a thread that has been started in should be able to update, because the thread is not UI thread, it can not directly update the list view array adapter. Is there any way? I was thinking that it is possible to trigger the Not sure if I fully understand your problem, but I believe that you want There are two ways to get it: 1- Instead of a thread, start a AsyncTask with 2-Use onCreate () and this thread contains some data Is it possible that
ListView before the thread ends?
handler from this thread, whose runabile is executed on the main UI thread.
onPostExecute () , which means that you can not find any UI-related can do. You can start asyncTask in onCreate (), and, once it is finished, it calls a method on your activity that:
myAdapter.notifyDataSetChanged ();
No comments:
Post a Comment