ac4android
Well-Known Member
Hi, I have dozens of EditText objects in my layout XML that I would like to clear with a button.
I would like to revamp the old tedious java which basically does this:
EditText edittext1=(EditText) findViewById(R.id.editText1);
edittext1.setText("");
As you can imagine, it gets repetitive. How can I get a count of the EditText (or any other Objects for that matter) in the content.XML so I can use a loop to do it...
I would like to revamp the old tedious java which basically does this:
EditText edittext1=(EditText) findViewById(R.id.editText1);
edittext1.setText("");
As you can imagine, it gets repetitive. How can I get a count of the EditText (or any other Objects for that matter) in the content.XML so I can use a loop to do it...
