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属性里面的颜色一样了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM