3
In some apps like the ones shown below, the hint is not hidden when starting to write inside the field. In Gmail, it seems that the fields Of and To do not use hint are a combination of layout + style. The second example is the Organizze app that doesn’t seem to use the Gmail approach, but the hint. How to implement this feature?
Gmail:
Organizze:


Looking at the Gmail app I noticed two situations: 1) The
DeandParaare not hints fromEditText, may beTextViewsthat are out of the field. You can put together a layout that has this very easy functionality with aLinearLayout. 2) TheAssuntoand is hidden when you start typing. In Material Design, there is the concept ofFloat Labelthat can be seen here, and that there is an implementation in the librarydesign librarycall forTextInputLayoutwho can help you.– Wakim
@Wakim, if the
Deand theParahave been implemented as you think, made a hell of a gambiarra to position them.– Geison Santos
Not necessarily, this type of layout is very common:
LinearLayout horizontalwith 3 children:TextView+EditTextbackless +ImageButton. I don’t see any gambiarra, it’s just a way to organize a "form".– Wakim
@Wakim, you’re right. I looked more closely at the layout of Gmail. No gambiarra was structured the way you imagined.
– Geison Santos
Interesting @Wakim but the textViews are apparently occupying the same positions(inside) of Inputtext, note the line below that passes below the textview is the line of inputText, it seems more like a custom inputText. Looking at the app
Organizze– Skywalker
@Skywalker, this case is more interesting, yes, but the comments I made were for Gmail’s case, Organizze’s came later. I think I could implement using a kind of
TextDrawableand setting asdrawableLeft|drawableStartofEditText.– Wakim
So after I realized that the comment was about gmail, I found interesting this input from
Organizze– Skywalker