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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -