काम नहीं कर रहा है मेरी गतिविधि एक संवाद खोलती है। जब यह बंद हो जाता है तो मुझे निष्पादित करने के लिए ReloadTable()
फ़ंक्शन की आवश्यकता होती है। तो मैं setOnDismissListener
का उपयोग करने की कोशिश कर रहा हूं लेकिन यह ट्रिगर नहीं हो रहा है। क्या कोई मदद कर सकता है कि मैं क्या गलत कर रहा हूं?AlertDialog setOnDismissListener
धन्यवाद!
AlertDialog.Builder builder;
AlertDialog alertDialog;
Context mContext = getApplicationContext();
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.transaction, null);
builder = new AlertDialog.Builder(new ContextThemeWrapper(TransactionsList.this , R.style.dialogwithoutdim));
builder.setView(layout);
alertDialog = builder.create();
alertDialog.setOnDismissListener(new OnDismissListener() {
public void onDismiss(final DialogInterface dialog) {
ReloadTable();
}
});
builder.show();
यही कारण है कि यह आपके लिए शायद काम नहीं करता है, यह है: http://stackoverflow.com/ ए/1826 9965/89818 – caw