I have a textbox with a hint but I want the hint to always be shown, even when there is an input in the TB. Example is the \"To\" field in the Gmail app.
There are 3 approaches you could use (spoiler - use number 3), since as mentioned in my comment, in the Gmail example , it is not an actual hint:
Using a Linear Layout, getting a cleaner look in my opinion:
Using a Relative Layout, getting a result that mimics the Gmail App:
Note: might be problematic since the text will be displayed on top of the hint, see solution 3.
Result are as shown in this image:
Edit:
using a Drawable:
This seems a better solution (I personally just created it from snipping the 1:1 display of the TextView, will be in correct measurements this way), this will allow a cleaner layout code, and the text will be aware of the drawable: