I have an EditText and a Spinner. Initially the Spinner is Disabled, I want it to get enabled whenever there is some text in the EditText, For Example if i type something into the EditText Field it should get enabled and as i erase the text till there is nothing else the Spinner should go back to disabled, Any Help?
Share
Use a
TextWatcheron theEditTextfield and check the contents of theCharSequenceagainst"". If they’re equal, disable theSpinner, otherwise enable it.You may also want to check
mySpinner.isEnabled()before callingsetEnabled(...)on it.