android - ViewPagerIndicator - TabPageIndicator page titles randomly get split into 2 lines -
sometimes page title in tabpageindicator split 2 lines, whole words , broken words. here screen shots
1) split 2 lines - broken words
2) split 2 lines - whole words
3) not split 2 lines
here layout code:
<linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.viewpagerindicator.tabpageindicator android:layout_width="fill_parent" android:layout_height="45dp" android:layout_gravity="top" android:paddingtop="2dp" android:layout_marginbottom="2dp" /> <android.support.v4.view.viewpager android:layout_width="match_parent" android:layout_height="fill_parent"> </android.support.v4.view.viewpager> </linearlayout>
here style code:
<style name="customtabpageindicator"> <item name="footercolor">@color/brand</item> <item name="android:colorbackground">@color/white</item> <item name="footerlineheight">1dp</item> <item name="footerindicatorheight">3dp</item> <item name="android:textcolor">#ff555555</item> <item name="android:textsize">13sp</item> <item name="android:dividerpadding">5dp</item> <item name="android:layertype">software</item> <item name="android:showdividers">none</item> <item name="android:fadingedge">horizontal</item> <item name="android:fadingedgelength">8dp</item> <item name="selectedcolor">#ff000000</item> <item name="selectedbold">true</item> <item name="android:gravity">center</item> <item name="android:typeface">normal</item> <item name="android:background">@drawable/custom_tab_indicator</item> <item name="android:paddingleft">10dip</item> <item name="android:paddingright">10dip</item> <item name="android:paddingtop">4dp</item> <item name="android:paddingbottom">4dp</item> </style>
can tell me whats wrong here causes page titles randomly split 2 lines , not?
try adding line in style code...
<item name="android:maxlines">1</item>
or
update
have tried addingsingleline=true"
in styles ?
Comments
Post a Comment