简体   繁体   中英

How to change view Pager Tab in Android from child fragment of any Tab?

我有3个选项卡名称片段1,片段2,片段3。片段1在单击时有一个按钮,另一个片段(如片段1_2)将在同一选项卡中打开,片段1_2在单击时有一个按钮,片段2将打开并且选项卡应更改,但我无法更改标签。

您可以将该代码段放置在点击按钮中

tabLayout.getTabAt(1).select();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM