1. For too many controls, the function is similar, the quantity is many, may use the Include method. In the implementation application, you can put the control into the list collection.
private void Initview () {
//TODO auto-generated method stub
pwd1 = (edittext) Findviewbyid (r.id.pwd_et_6_1);
PWD2 = (edittext) Findviewbyid (r.id.pwd_et_6_2);
PWD3 = (edittext) Findviewbyid (r.id.pwd_et_6_3);
Pwd4 = (edittext) Findviewbyid (r.id.pwd_et_6_4);
PWD5 = (edittext) Findviewbyid (r.id.pwd_et_6_5);
Pwd6 = (edittext) Findviewbyid (r.id.pwd_et_6_6);
List.add (PWD1);
List.add (PWD2);
List.add (PWD3);
List.add (PWD4);
List.add (PWD5);
List.add (PWD6);
for (int i = 0; i < list.size (); i++) {
list.get (i); Addtextchangedlistener (watcher);
List.get (i). Setonkeylistener (delete);
The above content is relatively short, simple to introduce the Android development tips of the collection of relevant knowledge, I hope you like.