Tôi có một android.support.v4.view.PagerTabStrip
quy định tại xml như sau:Làm thế nào để thay đổi màu sắc của TabIndicater trong PagerTabStrip
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!--
This title strip will display the currently visible page title, as well as the page
titles for adjacent pages.
-->
<android.support.v4.view.PagerTabStrip android:id="@+id/pager_title_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="#33b5e5"
android:textColor="#fff"
android:paddingTop="4dp"
android:paddingBottom="4dp" />
</android.support.v4.view.ViewPager>
Làm thế nào tôi có thể thay đổi màu sắc TabIndicater
? Nó có thể được thay đổi programmaticaly bởi setTabIndicatorColor(int color) nhưng tôi cần phải tìm một cách để làm điều này trong xml.
Tôi đã bỏ lỡ điều gì đó chưa? Phong cách/Máy nhắn tin cho là gì? Bạn đã không sử dụng nó cả. – nevermind