android - How to manage multiple opens of dialog with TabHost -
i have strange problem. in map i'm creating dialog contains tabhost 2 tabs , buttons. in first run works fine. see 2 tabs, can switch between them , select option want. dialog closed. after invoke dialog second time don't see tabs , see button second tab inactive. whole tabhost broken. ideas ? below code
final dialog dialog = new dialog(context); dialog.setcontentview(r.layout.tower_dialog); dialog.settitle("tower type"); towerutils.getinstance(map, dialog).setupbuilddialog(position); dialog.show(); host = (tabhost) dialog.findviewbyid(r.id.towers); host.setup(); //tab 1 tabhost.tabspec spec = host.newtabspec("tab one"); spec.setcontent(r.id.tab1); spec.setindicator("tab one"); host.addtab(spec); //tab 2 spec = host.newtabspec("tab two"); spec.setcontent(r.id.tab2); spec.setindicator("tab two"); host.addtab(spec); setupbuttons(selectedposition);
Comments
Post a Comment