Here is my customized material viewpager layout如何更改材質viewpager標籤指標的文字顏色?
我必須以編程方式更改我的材料視圖頁面選項卡指示符顏色和字體。請給我一個這個解決方案。我無法找到任何解決方案在github中。
Here is my customized material viewpager layout如何更改材質viewpager標籤指標的文字顏色?
我必須以編程方式更改我的材料視圖頁面選項卡指示符顏色和字體。請給我一個這個解決方案。我無法找到任何解決方案在github中。
對於編程改變指示劑的顏色。
tabLayout.setSelectedTabIndicatorColor(Color.parseColor("#898989"));
請使用以下屬性來改變指示劑的顏色在tabLayout:
app:tabIndicatorColor="@android:color/white"
對於自定義字體,參考下面的鏈接:Change the font of tab text in android design support TabLayout
要更改指標的tabLayout顏色:
app:tabIndicatorColor="@android:color/your_color"
這是我的build.gradle行:
compile 'com.android.support:design:23.1.1' //Make sure check your version
使用的應用程序:tabIndicatorColor改變標籤指示劑顏色,要更改字體,您必須使用自定義字體 – NarenderNishad