Custom selected tab text color in SlidingTabLayout

前端 未结 6 1998
执笔经年
执笔经年 2020-12-13 14:14

I\'m using the SlidingTabLayout from google (https://developer.android.com/samples/SlidingTabsBasic/src/com.example.android.common/view/SlidingTabLayout.html).

It wo

6条回答
  •  我在风中等你
    2020-12-13 15:02

    Try this piece of code in your onCreate() method.

    tabTitleView.setTabTextColors(
        getResources().getColor(R.color.active), 
        getResources().getColor(R.color.inactive));
    

提交回复
热议问题