Android: How To Change Hint’s Size

Android: How To Change Hint’s Size

If you need to set a smaller hint for your edit text, you can set the hint this way:

myEditText.setHint(Html.fromHtml(
"<small><small><small>"
+ getString(R.string.hint)
+ "</small></small></small>"));

Also, you can set the size in the string resource file where is the string for the hint.

<string name="edit_text_hint"><font size="15">My hint string</font></string>

and in the xml file just set the hint as usual:

android:hint="@string/edit_text_hint"

 

, , ,
Previous Post
Android Chronometer Timer
Next Post
Android ShareActionProvider Change Text Color

Related Posts

Menu