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
De
andPara
are not hints fromEditText
, may beTextViews
that are out of the field. You can put together a layout that has this very easy functionality with aLinearLayout
. 2) TheAssunto
and is hidden when you start typing. In Material Design, there is the concept ofFloat Label
that can be seen here, and that there is an implementation in the librarydesign library
call forTextInputLayout
who can help you.– Wakim
@Wakim, if the
De
and thePara
have 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 horizontal
with 3 children:TextView
+EditText
backless +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
TextDrawable
and setting asdrawableLeft|drawableStart
ofEditText
.– Wakim
So after I realized that the comment was about gmail, I found interesting this input from
Organizze
– Skywalker