I have a Spinner:
Spinner country_list=new Spinner(this);
ArrayAdapter<String> adapter= new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, countries);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
country_list.setAdapter(adapter);
Now I want to show it as popup for user to select. Do I need to use AlertDialog or is there even a simpler way?
/EDIT:
Actually, what I want is not Spinner. I want to get a list of countries when user clicks a button and then he or she can select a country. So basically his is the “second part” of Spinner – where a list shows in a popup. Should I use ListView?
What I needed was
to display spinner with a button click.