Change TextInputLayout only hint text style
Asked Answered
P

0

6

I am trying to change TextInputLayout hint text style to bold. I changed color and other styles of hint in styles with use of TextAppearance :

 <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>

I tried to set

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

or

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

but it doesn't work. Hint text always has style of edit text (if edittext is bold, it automatically has bold hint, if not, the hint is normal) :

enter image description here

Platonism answered 24/10, 2016 at 12:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.