TheLettuceMaster
TheLettuceMaster

Reputation: 15734

Android Checkbox - control over an EditText?

I'd like a Checkbox to turn on or off notifications. (I am not using this in a settings menu).

I simply would like an EditText field with a label and it to be slightly grayed out and non-clickable unless this checkbox is checked. Once that happens, the EditText field comes to life and can be used. How would one go about doing this?

Upvotes: 2

Views: 1362

Answers (1)

John Boker
John Boker

Reputation: 83719

You could use the checkbox oncheckchanged listener and modify the edittext when it's unchecked, more here: http://mgmblog.com/2008/02/18/android-checkbox-oncheckedchangelistener/

Upvotes: 1

Related Questions