布局+代码设置显示
android:id="@+id/etName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:ellipsize="end"
android:inputType="textPassword"
android:digits="+-_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLIMNOPQRSTUVWXYZ"
android:hint="请输入昵称"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_20"
android:singleLine="true"
android:textColor="@color/hui_ff6"
android:textColorHint="@color/hui_ff6"
android:textSize="@dimen/sp_15" />
代码设置可现实
etName.transformationMethod = HideReturnsTransformationMethod.getInstance()
以上是我所想到的解决方案,有更好的解决方案,希望码农提供下哈
最后
以上就是坦率美女最近收集整理的关于android验证数字字母和特殊字符,Android EditText设置输入字母、数字、特殊字符的全部内容,更多相关android验证数字字母和特殊字符,Android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复