android - Is there a workaround for the hint bug? -
so i'm facing bug on android, if set, edittext, gravity "center", inputtype , hint, hint not displayed. i've tried multiple advices, adding `singleline="true", ellipsize parameter, or few others, multiple combinations of these, no effect. can manage either field not centered hint, or centered without hint.
the trade-off utilize (no inputtype
):
<edittext android:id="@+id/view_email" android:layout_width="match_parent" android:layout_height="0dp" android:layout_margin="12dp" android:layout_weight="1" android:paddingtop="7dp" android:paddingbottom="7dp" android:gravity="center" android:maxlines="1" android:ellipsize="start" android:hint="@string/email_placeholder" android:background="#ffffff" android:imeoptions="flagnoextractui"/>
apparently it's a known bug, couldn't find workaround worked in case. seek have edittext input of type "email", centered hint.
has come workaround works this? found out it's quite pita users come in email when input type not set email.
this worked me, give try
<edittext android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputtype="numberdecimal" android:digits="0123456789.," android:ellipsize="start" android:maxlines="1" android:gravity="center" android:background="#ffffff" android:hint="@string/email_placeholder"> </edittext>
android user-interface android-edittext
No comments:
Post a Comment