Based on the condition i would like “to show the drop down view of a spinner or show a default value and do not show the drop down”. I used setClickable(false) in the spinner object but it didn’t work. How to implement it?
Try:
((Spinner) spinner).getSelectedView().setEnabled(false);
spinner.setEnabled(false);
                        Disable or enable it before setting the adapter.
spinner.setEnabled(false);   
spinner.setClickable(false);  
spinner.setAdapter(typeAdapter);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With