如何更改密码字段diplay星号代替点 [英] How to change password field to diplay asterisks instead of dots

查看:101
本文介绍了如何更改密码字段diplay星号代替点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作,需要密码字段(i.e.the编辑文本)隐藏用星号(*),而不是点用户输入的任务()。目前它显示为点。
请告诉我,如果它可以使用Android的原生方法来做到这一点。或请张贴code做到这一点,如果有人已经这样做了。

在此先感谢..


解决方案

 公众最终无效setTransformationMethod(TransformationMethod法)自:API级别1
设定施加到这TextView的被显示文本的转换。
相关XML属性机器人:密码
机器人:SINGLELINE

允许你改变任何字符

I am working on the task that requires the password field (i.e.the Edit Text) to hide user input using asterisks(*) rather than dots(.). Currently it shows as dots. Kindly tell me the way to do it if its possible using android's native methods. Or please post the code to do it if anyone has already done that.

Thanks in advance..

解决方案

public final void setTransformationMethod (TransformationMethod method)

Since: API Level 1
Sets the transformation that is applied to the text that this TextView is displaying.
Related XML Attributes

android:password
android:singleLine

allows you to change any char

这篇关于如何更改密码字段diplay星号代替点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆