Make a slight change to the Pagerslidingtabstrip on GitHub:
tab text color selected color change (original text does not change color)
Chestnut: http://download.csdn.net/detail/onlyonecoder/7722021
Pagerslidingtabstrip a custom attribute list:
pstsIndicatorColorColor of the sliding indicator
pstsUnderlineColorColor of the Full-width line on the bottom of the view
pstsDividerColorColor of the dividers between tabs
pstsIndicatorHeightHeight of the sliding indicator
pstsUnderlineHeightHeight of the Full-width line on the bottom of the view
pstsDividerPaddingTop and bottom padding of the dividers
pstsTabPaddingLeftRightLeft and right padding of each tab
pstsScrollOffsetScroll offset of the selected tab
pstsTabBackgroundBackground drawable of each tab, should is a statelistdrawable
pstsShouldExpandIf set to True, all tab is given the same weight, default false
pstsTextAllCapsIf True, all tab titles are upper case, default True
A property is added after the modificationSelectedtabtextcolor
If you do not set the default and slide indicator colors (pstsindicatorcolor) consistent
The code for the effect:
<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http// Schemas.android.com/tools "android:layout_width=" match_parent "android:layout_height=" match_parent "xmlns:app=" H Ttp://schemas.android.com/apk/res/org.lmw.demo.slidingtab "> < Org.lmw.demo.slidingtab.widget.PagerSlidingTabStrip android:id= "@+id/tabs" android:layout_width= "Match_paren T "android:layout_height=" 40DP "app:pstsshouldexpand=" true "app:pstsunderlineheight=" 2DP "app: pstsindicatorheight= "2DP" app:pstsindicatorcolor= "@android: Color/holo_blue_light" app:selectedtabtextcolor= "@ Android:color/holo_blue_light "app:pstsdividercolor=" @android: Color/transparent "app:pststabbackground=" @drawabl E/background_tab "android:background=" @android: Color/white "/> <android.support.v4.view.viewpager Android:id= "@+id/pager" android:layout_width= "Match_parent" android:layout_height= "Wrap_content" android:layout_below= "@+id/tabs"/></relativelayout>