android - How Do I change the indicator of a tabhost dynmaicly from an other activity -
i have tabhost contains 5 tab (monday .... friday). want change indicators dynamically other activities (using button) 1 have solution in advance
get hold of tabindicator view. consists of imageview , textview unless have own custom tabindicator.
viewgroup tabinidcator = tabhost.gettabwidget().getchildtabviewat('the index of tab want change')
the textview inside relative layout 2nd child (careful might change) unless have custom tabindicator view.
textview tabindicator = (textview) tabindicator.getchildat(1); indicator.settext("thunday");
if want change image imageview @ location 0
Comments
Post a Comment