如何在android?
中使用seekbar创建密码强度检查器解决方法:
您可以使用https://github.com/VenomVendor/Password-Strength-Checker满足您的要求
或使用TextWatcher检查EditText长度.就像这样
public voID afterTextChanged(Editable s) { if(s.length()==0) textVIEwPasswordStrengthindiactor.setText("Not Entered"); else if(s.length()<6) textVIEwPasswordStrengthindiactor.setText("EASY"); else if(s.length()<10) textVIEwPasswordStrengthindiactor.setText("MEDIUM"); else if(s.length()<15) textVIEwPasswordStrengthindiactor.setText("STRONG"); else textVIEwPasswordStrengthindiactor.setText("STRONGEST"); if(s.length()==20) textVIEwPasswordStrengthindiactor.setText("Password Max Length Reached"); } };
Demo Help
总结afterTextChanged (Editable s) – This method is called when the text
has been changed. Because any changes you make will cause this method
to be called again recursively, you have to be watchful about
performing operations here, otherwise it might lead to infinite loop.
以上是内存溢出为你收集整理的带有搜索栏的Android密码强度检查器全部内容,希望文章能够帮你解决带有搜索栏的Android密码强度检查器所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)