0

Of the Android Spinner widget, I only want to use the functionality that pops up a list of options to choose from. I don't want to display the selected value anywhere. Is this possible? Or must I use a Dialog in this case?

The advantage of a Spinner would be that I can easily listen for changes, while with a Dialog I would have to handle the Dialog lifecycle etc.

Nino van Hooff
  • 3,677
  • 1
  • 36
  • 52

1 Answers1

0

In your SpinnerAdapter add empty OnClickListener at the your item View

@Override
        public  final View getDropDownView(  int position,   View   convertView,   ViewGroup parent) {
            View itemView = //some view
            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick( View v) {

                }
            });

            return itemView;

        }