"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
You can simply check that yourField.text() is not equivalent to null or "" at the point of submission. If it is, prompt the user to input something.
Maybe also trim the string if you don't want whitespace to count as an imput. – fiXedd Apr 22 '10 at 17:38 I appreciate both suggestions. And that's essentially what I'm doing -- validating after all fields in the screen are filled in and the user pushes the 'go' button.
But what I was looking/hoping for was a way to give instant feedback when focus leaves one field before it goes to the next. – AG. Apr 22 '10 at 20:58 Then you just want to do the check in the onFocusChanged() of the EditText – jqpubliq Apr 22 '10 at 22:17 THAT's what I was missing.
I looked at onFocusChanged() but was lead astray by it being a View method so I was thinking it applied to something other than a single field. But, of course, an EditText is a TextView which is, in turn, a View. Thanks.
– AG. Apr 22 '10 at 15:54.
Carefull with something though. If you have a submit button, for instance, and your user presses submit without changing the focus out of your TextEdit, your method won't be called. Take an Activity with 2 EditTexts and 1 button named "Go": 1) User writes something in EditText1 2) User clicks on EditText2 3) Instead of writting something there just clicks go.
Your onFocusChanged() method won't be called because focus is not "lost". If you have a validation in your Go button_click method, it will trigger, of course, but you won't achieve your goal "I was looking/hoping for was a way to give instant feedback" You can try using TextWatcher.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.