Modify tab indicator dynamically in Android

后端 未结 3 1183
我寻月下人不归
我寻月下人不归 2021-02-13 13:55

My application needs to update tab indicator dynamically, I\'m trying to do this by invoke TabSpec.setIndicator(), but it doesn\'t work. Here is my code:

In onCreate met

3条回答
  •  天涯浪人
    2021-02-13 14:36

    Try this:

     TextView title = (TextView) TabHost.getTabWidget().getChildTabViewAt(tabId).findViewById(android.R.id.title);
    

提交回复
热议问题