I want the hint
size of an EditText
to be smaller than the real text.
At present I know two solutions:
-
using
Html.fromHtml()
programmatically, or -
using
<font size="">
in the XML.
However, I don't want to use the first solution because I want the hint to be directly written in my layout XML, while, regarding the second solution, I don't like using the font
element because (if I'm not wrong) I cannot explicit the dp
measure. Furthermore, the font
element is deprecated in HTML5, so it belongs to the "old-style".
I've tried to use the span
element with the font-size
attribute (from CSS) in my XML, but it doesn't work. Is there any other up-to-date solution?
Aucun commentaire:
Enregistrer un commentaire