Edittext want to go enable from disable after select the particular item in the spinner items

后端 未结 2 911
无人及你
无人及你 2021-02-10 20:53

I\'m using Spinner,EditText and Button in one page.The spinner has these items ...

Following:

 String[] Items = {
            \"Alarm\",
            \"O         


        
2条回答
  •  無奈伤痛
    2021-02-10 21:23

    I assume that you get the value from the Spinner.

    After getting the value using condition u set the edittext enabled or disabled through this code:

      EditText.setEnabled(BooleanValue);
    

    true is default value and false set the edittext disabled.

提交回复
热议问题