2016-09-26 4 views
0

すべて大文字で書いていないデフォルトAppCompatButtonは私がサポートライブラリが依存関係として追加されてい

compile 'com.android.support:appcompat-v7:24.2.1'私のstyles.xmlはこのようになります

<resources xmlns:android="http://schemas.android.com/tools"> 

    <!-- Base application theme. --> 
    <style name="AppTheme" parent="Theme.AppCompat"> 
     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/colorPrimary</item> 
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
     <item name="colorAccent">@color/colorAccent</item> 
    </style> 

</resources> 

と私のボタン自身:

<android.support.v7.widget.AppCompatButton 
     android:layout_width="88dp" 
     android:layout_height="48dp" 
     android:layout_marginBottom="16dp" 
     android:layout_marginEnd="16dp" 
     android:layout_marginStart="75dp" 
     android:layout_marginTop="82dp" 
     android:text="RETURN" 
    android:textSize="14sp"/> 

ボタンは現在次のようになります。enter image description here

テキストをすべて大文字に設定しているが、通常の文字で上書きされていることにも注意してください。スタイルはどこかで上書きされていますか?

私が追加しようとしている:

style="@style/Widget.AppCompat.Button"をボタンに何も起こりませんでした。どこが間違っていますか?

+1

ここで、textAllCaps属性はありますか? – Blackbelt

+0

おっと...長い一日でした。それが問題でした。これを答えにしたいですか?私は本当にスマートな感じです@Blackbelt 私はtextAllCapsがデフォルトでtrueだったと思っていましたが、変更したに違いありません –

+1

誰かがすでにそれをしました。 – Blackbelt

答えて

0

android:textAllCaps="true"属性をボタンに追加します。

関連する問題