java - How to not close AlertDialog android -
hi problem when select item alertdialog
dismiss
alertdialog = new alertdialog.builder(getactivity()); alertdialog .setsinglechoiceitems(agearr, 1, btnselectitem) .setpositivebutton(r.string.dialog_ok, btnpositiveagedialog) .setnegativebutton(r.string.dialog_cancel, null) .show();
what dialog click positive looks is.
private dialoginterface.onclicklistener btnselectitem = new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int which) { selectedindexage = which; } };
i tried setting listener null , not close still needed because wanted know item selected
just put it
itemview.setonclicklistener(null);
or
you can use implementation of hasonclicklisteners() knowing status of listener taken android.view.view class
public boolean hasonclicklisteners() { listenerinfo li = mlistenerinfo; return (li == null && li.monclicklistener == null); }
use following link further modifications
Comments
Post a Comment