android - EditText cursor resides after the hint -
i have simple sign in activity
in app email , password fields. there strange problem hint
, cursor
position in email edittext
:
as can seen in image, default, cursor
isn't @ first position. shown after hint (as if hint
input text)
as far layout
goes, password edittext
same email one, doesn't have problem:
anyone has clue why happens? , how can solve it?
here's activity's layout:
<scrollview android:id="@+id/login_form" android:layout_width="match_parent" android:layout_height="match_parent" > <linearlayout style="@style/loginformcontainer" android:orientation="vertical" > <edittext android:id="@+id/email" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="left" android:hint="@string/prompt_email" android:inputtype="textemailaddress" android:maxlines="1" android:singleline="true" /> <edittext android:id="@+id/password" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="left" android:hint="@string/prompt_password" android:imeactionid="@+id/login" android:imeactionlabel="@string/action_sign_in_short" android:imeoptions="actionunspecified" android:inputtype="textpassword" android:maxlines="1" android:singleline="true" /> <relativelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margintop="20dip" android:gravity="center" > <!-- sign in button --> <textview android:gravity="center" android:id="@+id/sign_in_button" android:layout_width="120dip" android:layout_height="50dip" android:layout_alignparentright="true" android:layout_marginleft="25dip" android:layout_marginright="20dip" android:background="@drawable/btn_background_login_and_offered_and_followers" android:clickable="true" android:onclick="signinbutton" android:text="@string/action_sign_in_register" /> <!-- sign button --> <textview android:gravity="center" android:id="@+id/sign_up_button" android:layout_width="120dip" android:layout_height="50dip" android:layout_marginleft="20dip" android:layout_toleftof="@id/sign_in_button" android:background="@color/gray" android:onclick="signupbutton" android:text="@string/action_sign_up_register" /> </relativelayout> </linearlayout> </scrollview>
if other code part needed, please tell me add it.
try code:
android:textcursordrawable="@null"
it works me.
Comments
Post a Comment