2016-02-02 80 views
0

我想要選項卡中的小寫字母但它不起作用。我正在使用以下代碼。請參見下面我仿真圖像: -選項卡中的小文本文本

enter image description here

的選項卡仍處於大寫字母。

<android.support.design.widget.TabLayout 
        android:id="@+id/tabs" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        style="@style/My.TabText.style" 
        android:background="#f5f5f5" 
        app:tabIndicatorColor="@color/colorPrimary" 
        app:tabTextColor="@color/tab_text" 
        /> 


    <style name="My.TabText.style" parent="@style/Theme.AppCompat.Light"> 
      <item name="android:actionBarTabTextStyle">@style/MyTabTextStyle</item> 
      <item name="actionBarTabTextStyle">@style/MyTabTextStyle</item> 
    </style> 
    <style name="MyTabTextStyle" parent="@style/Widget.AppCompat.Light.ActionBar.TabText"> 
      <item name="android:textColor">#333</item> 
      <item name="textAllCaps">false</item> 
    </style> 
+0

您是否嘗試過這個父= 「@安卓風格/ Widget.ActionBar.TabText」 作爲家長嗎? –

+0

你說的是「My.TabText.style」的父親權限,這樣做也行不通 –

+0

不,父母的「MyTabTextStyle」,就像這樣的