android - ProgressBar not updating after changing back to the view -


i've got tabhost displays 2 tabs. first tab has seekbar on when changed, changes value of object objecta.setvalue(newvalue).

my second tab expandablelist. list -- when i've got group expanded -- reflect value of objecta in progressbar:

public view getchildview(int groupindex, int childindex, boolean islastchild, view convertview, viewgroup parent) {      ... // objecta retrieved      linearlayout layout;      if (convertview == null) {         layout = (linearlayout) layoutinflater.from(myapp.getcontext()).inflate(r.layout.rooms_room_list_row, parent, false);     } else {         layout = (linearlayout) convertview;      }      final progressbar pblevel = (progressbar)layout.findviewbyid(r.id.ddlevel);            pblevel.setprogress(objecta.getvalue()); 

this works good, except in following scenario:

  1. i go 1st view , set value of 50
  2. i switch 2nd tab, , expand group. progressbar shows 50%, expected.
  3. i switch 1st tab , change value of 50 value of 5
  4. when switch 2nd tab, since group expanded android automatically re-creates view. breakpoint in getchildview method hit can verify new objecta value set 5 (again, expected) , can watch progressbar's value set 5, screen doesn't reflect change -- it's still stuck on showing 50%. if collapse group , re-open it, works , reflect value of 5%.

so what's going on when switch view? why won't screen reflect 5% after running through getchildview method first time while view being re-created?


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -