-1

To set hintSize of EditText, I set font size in string.xml,like this:

<string name="hello_world"><font size="15">Hello world!</font></string>

<EditText>
 android:hint="@string/hello_word"
</EditText>

It works, while I confuse if it works fine on different devices with different screens?

why_rookie
  • 78
  • 1
  • 9

1 Answers1

0

Right way to use

string.xml

<string name="hello_world">Hello world!</string>

style xml

<style name="style">
    <item name="android:textSize">19sp</item>
    <item name="android:textColor">@color/standout_text</item>
    <item name="android:textStyle">bold</item>
</style>

use that style on TextView

Naveen Tamrakar
  • 3,349
  • 1
  • 19
  • 28