1

I am making a project in android.

Basically I have added 2 radio buttons and 2 text fields.

I want to make one of the text fields grayed out depending on which of the radio buttons are selected.

I have no idea how to add this functionality.

Would appreciate any guidance.

js091514
  • 165
  • 1
  • 9

1 Answers1

0

You will need to

The event handler pseudocode:

public void onradioButtonClicked ()
{
   if (ButtonClicked() == opt1)
   {
      txtTextField2.Enabled = false;
      txtTextField1.Enabled = true;
   }
   else
   {
      txtTextField2.Enabled = true;
      txtTextField1.Enabled = false;
   }
}
Community
  • 1
  • 1
mikek3332002
  • 3,546
  • 4
  • 37
  • 47