[Solved] How to open a pop up window on clicking on list view items? [closed]


Use following code inside onItemClickListener

  final CharSequence[] items = { "Mango", "Banana", "Apple" };
            AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setTitle("Select Fruit");
            builder.setItems(items, new DialogInterface.OnClickListener() {

                @Override
                public void onClick(DialogInterface dialog, int which) {
                    // TODO Auto-generated method stub
                    dialog.cancel();

                }
            });
            AlertDialog alert = builder.create();
            alert.show();

solved How to open a pop up window on clicking on list view items? [closed]