Xamarin C#的EditText inputType下密码 [英] Xamarin C# EditText InputType Password
本文介绍了Xamarin C#的EditText inputType下密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到的是从JSON文件创建了一些的EditText领域。所以,我不能改变的XML文件。但我想一些领域的EditText有输入类型的密码。我在Xamarin Studio中工作与C#。
我有这样的事情,但还是不行,我怎么能解决这个问题?
editText.InputType = InputTypes.TextVariationPassword;
解决方案
试试这个:
editText.InputType = Android.Text.InputTypes.TextVariationPassword | Android.Text.InputTypes.ClassText;
I got some EditText fields that are created from a Json file. So I can't change the XML files. But I want some EditText fields to have input type "password". I'm working in Xamarin Studio with C#.
I got something like this but that doesn't work, how can I fix this?
editText.InputType = InputTypes.TextVariationPassword;
解决方案
Try this:
editText.InputType = Android.Text.InputTypes.TextVariationPassword | Android.Text.InputTypes.ClassText;
这篇关于Xamarin C#的EditText inputType下密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文