I have a spinner widget in my activity which lets users pick a list name.
Normally, the function of the spinner is to switch between lists but for a couple of instances,
This is best example for popup details like spinner using AlertDialog and AlertDialog.Builder
AlertDialog dialog;
final CharSequence[] items = { "Item1", "Item2" };
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(title);
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int pos) {
switch (pos) {
case 0:
{
Toast.makeText(this,"Clicked on:"+items[pos],Toast.LENGTH_SHORT).show();
}break;
case 1:
{
Toast.makeText(this,"Clicked on:"+items[pos],Toast.LENGTH_SHORT).show();
}break;
}
}});
dialog=builder.create();
dialog.show();