0

I've been struggling with setting size of hints in my EditText. The hint's font size becomes too large and the layout starts to look horrible!

EditText dummy = new EditText();
dummy.setHint("some hint");

How do I dynamically and programmatically change the hint's font size w.r.t my priorly set MAX_HINT_SIZE (in pixels)?

Prerak Sola
  • 9,517
  • 7
  • 36
  • 67

1 Answers1

1

Found something for you

editTextPassword.setHint(Html.fromHtml("<font size=\"16\">" + "Password " + "</font>" + "<small>" + "(at least 12 charcters)" + "</small>" ));

See the accepted answer here

Community
  • 1
  • 1
Neal Ahluvalia
  • 1,538
  • 1
  • 10
  • 20