editText内容从hint右输入

如何让editText内容从hint右输入呢:

<EditText
            android:id="@+id/et_password"
            android:textColor="#FFF"
            android:textColorHint="#C2C2C2"
            android:hint="请输入密码"
            android:textCursorDrawable="@null"
            android:textSize="16sp"
            android:gravity="right"
            android:layout_toRightOf="@id/txt_password"
            android:layout_alignBaseline="@id/txt_password"
            android:layout_alignLeft="@+id/et_username"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword" />

加上标红色的两句就可以了。

注意:

android:textCursorDrawable="@null"加上后,hint的文字颜色就和text属性里面的颜色一样了。
posted @ 2017-03-03 16:02  jdhdevelop  阅读(3058)  评论(0编辑  收藏  举报