Say I have multiple EditTexts in an application. When I click a Button, I want to test what EditTexts are empty and what EditTexts have content. I also want the id of the EditText whose content is NOT empty. How would I do that? Could someone write the code for the Button click handler. My six EditText’s ids are FirstString, SecondString, ThirdString, … The Button’s id is button.
Share
Just create an array for the class holding them when you set up the view, and check each one on the button press. Can’t really write the code without seeing what you had already.