Disabling Spinner in android

后端 未结 4 479
太阳男子
太阳男子 2021-02-03 16:53

I\'m having problems when using android:enabled=\"false\", it\'s not disabling the component in the case it\'s a spinner

4条回答
  •  抹茶落季
    2021-02-03 17:34

    Disable or enable it before setting the adapter.

    yourSpinner.setEnabled(false);   
    yourSpinner.setClickable(false);  
    yourSpinner.setAdapter(typeAdapter);
    

提交回复
热议问题