android - Difficulty in hint display for edit text -
hi used hint edit text shows perfect when not used gravity
of edit text center
but once when used android:gravity="center"
doesnot showing hint know why?
here code
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignparentleft="true" android:layout_alignparenttop="true" > <linearlayout android:id="@+id/linearlayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:orientation="vertical" > <include layout="@layout/header" /> </linearlayout> <relativelayout android:id="@+id/rl" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/maroon" android:orientation="vertical" > <relativelayout android:id="@+id/login_rllogin" android:layout_width="match_parent" android:layout_height="200dp" android:layout_centerinparent="true" android:visibility="gone" > <edittext android:id="@+id/login_et_password" android:layout_width="match_parent" android:layout_height="40dp" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_centervertical="true" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:background="@color/white" android:gravity="center" android:hint="@string/login_hint_enterpassword" android:inputtype="numberpassword" android:maxlength="4" android:maxlines="1" android:textcolor="@color/black" android:textcolorhint="@color/dark_gray" /> <button android:id="@+id/login_btn_login" android:layout_width="match_parent" android:layout_height="45dp" android:layout_alignleft="@+id/login_et_password" android:layout_alignright="@+id/login_et_password" android:layout_below="@+id/login_et_password" android:layout_margintop="5dp" android:background="@color/fent_orange" android:text="@string/login_btn_caption" android:textappearance="?android:attr/textappearancelarge" android:textcolor="@color/black" android:textstyle="bold" /> </relativelayout> <relativelayout android:id="@+id/login_rlreg" android:layout_width="match_parent" android:layout_height="150dp" android:layout_centerinparent="true" android:visibility="visible" > <edittext android:id="@+id/login_et_repassword" android:layout_width="match_parent" android:layout_height="40dp" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_centervertical="true" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:layout_margintop="1dp" android:background="@color/white" android:gravity="center" android:hint="@string/login_hint_reenterpassword" android:inputtype="numberpassword" android:maxlength="4" android:maxlines="1" android:textcolor="@color/black" android:textcolorhint="@color/dark_gray" /> <button android:id="@+id/login_btn_submit" android:layout_width="match_parent" android:layout_height="45dp" android:layout_alignleft="@+id/login_et_repassword" android:layout_alignright="@+id/login_et_repassword" android:layout_below="@+id/login_et_repassword" android:layout_margintop="5dp" android:background="@color/fent_orange" android:text="@string/submit_btn_caption" android:textappearance="?android:attr/textappearancelarge" android:textcolor="@color/black" android:textstyle="bold" /> <edittext android:id="@+id/login_et_choosepassword" android:layout_width="match_parent" android:layout_height="40dp" android:layout_above="@+id/login_et_repassword" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:background="@color/white" android:gravity="center" android:hint="@string/login_hint_choosepassword" android:inputtype="numberpassword" android:maxlength="4" android:maxlines="1" android:textcolor="@color/black" android:textcolorhint="@color/dark_gray" > <requestfocus /> </edittext> </relativelayout> <textview android:id="@+id/tvapptitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/login_rlreg" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_alignparenttop="true" android:gravity="center" android:text="@string/app_name" android:textappearance="?android:attr/textappearancelarge" android:textsize="26sp" android:textstyle="bold" /> <relativelayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_below="@+id/textview1" android:background="@color/white" > <textview android:id="@+id/textview3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerinparent="true" android:background="@drawable/ztam" android:textappearance="?android:attr/textappearancelarge" /> </relativelayout> <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="7dp" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_below="@+id/login_rlreg" android:layout_margintop="70dp" android:background="@color/fent_orange" android:textappearance="?android:attr/textappearancemedium" /> </relativelayout> </relativelayout>
Comments
Post a Comment