How to change android tab text on the fly?

后端 未结 7 1667
灰色年华
灰色年华 2021-01-04 01:42

This seems like it should be simple, but I can\'t figure out a way to do it. I\'m needing a tab to have beginning text, but then have that text change after the user selects

相关标签:
7条回答
  • 2021-01-04 02:47

    This is simple and easy. Try it. It works.

    TabWidget tab = (TabWidget) findViewById (R.id.tab1);
    ((TextView)tab.getChildTabViewAt (1)).setText ("New name here");
    
    0 讨论(0)
提交回复
热议问题