带有搜索栏的Android密码强度检查器

带有搜索栏的Android密码强度检查器,第1张

概述如何在android?中使用seekbar创建密码强度检查器解决方法:您可以使用https://github.com/VenomVendor/Password-Strength-Checker满足您的要求或使用TextWatcher检查EditText长度.就像这样publicvoidafterTextChanged(Editables){

如何在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密码强度检查器所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1111006.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存