TabLayout selected Tab icon is not selected on start up

前端 未结 6 434
小鲜肉
小鲜肉 2021-01-17 14:14

I\'m using a TabLayout for Tabbed navigation in my app. I have a really weird issue with it, I have created 4 tabs using this code:

private int[         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 14:59

    Try this:

    tabLayout.getTabAt(yourInitialPosition).getCustomView().setSelected(true);

提交回复
热议问题