multithreading - Updating android views from background threads dynamically -
i have expandable list view parent , child data related, not independent of each other. data real time , related parent. way have set app fetch data parent , child , in onpostexecute method of asynctaskthread update adapter.
having said that, not see way android can support dependency of parent view , child view. can make 2 separate api calls each fetches data parent , child , update, not work since asynctask threads run in parallel. there way update ui such can expand list view , show data based on parent selected? know can set listener, makes no effect since time listening have had fetch data parent , child arrays.
in visual form, mean parentlist = {1, 2, 3, 4, 5}
, child list list {"hello", "how you", "i well", etc etc}
data continuously changing. each time click on 1 want see new data says "hello",
if still hello, or if there new data should see that.
Comments
Post a Comment