2016-10-24 6 views
2

TextInputLayoutヒントテキストスタイルを太字に変更しようとしています。私はTextInputLayoutをヒントテキストスタイルのみに変更する

<item name="android:textStyle">normal</item> 

または

<item name="android:textStyle">bold</item> 

を設定しようとしましたが、それは動作しません

<style name="MyTextInputLayoutTheme" parent="@android:style/TextAppearance"> 
     <item name="android:layout_height">wrap_content</item> 
     <item name="android:layout_width">match_parent</item> 
     <item name="android:textColorHint">@color/black_50</item> 
     <item name="colorControlNormal">@color/green</item> 
     <item name="hintAnimationEnabled">false</item>   
    </style> 

:私はTextAppearanceの使用でのスタイルに色やヒントの他のスタイルを変更しました。ヒントテキストは常に(のEditTextが太字であれば、それは自動的に大胆なヒントを持っていない場合は、ヒントが正常である)エディットテキストのスタイルを持っています

enter image description here

答えて

0

頭に浮かぶ最も簡単な方法はこれです:

内部strings.xml <string name="myHint"><b>Your hint here</b></string>
layout.xmlファイル<EditText android:hint="@string/myHint"/>

関連する問題