How to add to an EditText component another hint that will react as an hint, but with different as the default hint.
For example: field name is city, so I would like the primary hint in black to be displayed as "city" and in light blue I would like it to be dislayed as "tap to select a city".
Are there any ready-to-go components or xml attributes for it? Is this a case where I need Java code and implement onfocus and show/hide another TextView that will react as label?
I got this as strings.xml:
<string name="fld_fullname">
<![CDATA[
<font color="#8B8B8B">City</font> <font color="#BABABA">tap to change</font>
]]>
</string>
and this in Java code:
etCity.setHint(Html.fromHtml(getString(R.string.fld_city)));
Now, how can I take the color from colors.xml? Might I use placeholders or is there a better way? Asking for best practice...
There is only one hint attribute to EditText although you can add multi-colored hint programmatically like this
EDIT: if you are taking values from string.xml and color.xml then do following: