Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3012,6 +3012,7 @@ package android.app { method public android.app.AlertDialog.Builder setNeutralButton(int, android.content.DialogInterface.OnClickListener); method public android.app.AlertDialog.Builder setNeutralButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener); method public android.app.AlertDialog.Builder setOnCancelListener(android.content.DialogInterface.OnCancelListener); method public android.app.AlertDialog.Builder setOnDismissListener(android.content.DialogInterface.OnDismissListener); method public android.app.AlertDialog.Builder setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener); method public android.app.AlertDialog.Builder setOnKeyListener(android.content.DialogInterface.OnKeyListener); method public android.app.AlertDialog.Builder setPositiveButton(int, android.content.DialogInterface.OnClickListener); core/java/android/app/AlertDialog.java +18 −0 Original line number Diff line number Diff line Loading @@ -566,7 +566,14 @@ public class AlertDialog extends Dialog implements DialogInterface { /** * Sets the callback that will be called if the dialog is canceled. * * <p>Even in a cancelable dialog, the dialog may be dismissed for reasons other than * being canceled or one of the supplied choices being selected. * If you are interested in listening for all cases where the dialog is dismissed * and not just when it is canceled, see * {@link #setOnDismissListener(android.content.DialogInterface.OnDismissListener) setOnDismissListener}.</p> * @see #setCancelable(boolean) * @see #setOnDismissListener(android.content.DialogInterface.OnDismissListener) * * @return This Builder object to allow for chaining of calls to set methods */ Loading @@ -575,6 +582,16 @@ public class AlertDialog extends Dialog implements DialogInterface { return this; } /** * Sets the callback that will be called when the dialog is dismissed for any reason. * * @return This Builder object to allow for chaining of calls to set methods */ public Builder setOnDismissListener(OnDismissListener onDismissListener) { P.mOnDismissListener = onDismissListener; return this; } /** * Sets the callback that will be called if a key is dispatched to the dialog. * Loading Loading @@ -917,6 +934,7 @@ public class AlertDialog extends Dialog implements DialogInterface { dialog.setCanceledOnTouchOutside(true); } dialog.setOnCancelListener(P.mOnCancelListener); dialog.setOnDismissListener(P.mOnDismissListener); if (P.mOnKeyListener != null) { dialog.setOnKeyListener(P.mOnKeyListener); } Loading core/java/android/app/Dialog.java +6 −4 Original line number Diff line number Diff line Loading @@ -1106,10 +1106,12 @@ public class Dialog implements DialogInterface, Window.Callback, /** * Set a listener to be invoked when the dialog is canceled. * <p> * This will only be invoked when the dialog is canceled, if the creator * needs to know when it is dismissed in general, use * {@link #setOnDismissListener}. * * <p>This will only be invoked when the dialog is canceled. * Cancel events alone will not capture all ways that * the dialog might be dismissed. If the creator needs * to know when a dialog is dismissed in general, use * {@link #setOnDismissListener}.</p> * * @param listener The {@link DialogInterface.OnCancelListener} to use. */ Loading core/java/com/android/internal/app/AlertController.java +1 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,7 @@ public class AlertController { public DialogInterface.OnClickListener mNeutralButtonListener; public boolean mCancelable; public DialogInterface.OnCancelListener mOnCancelListener; public DialogInterface.OnDismissListener mOnDismissListener; public DialogInterface.OnKeyListener mOnKeyListener; public CharSequence[] mItems; public ListAdapter mAdapter; Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3012,6 +3012,7 @@ package android.app { method public android.app.AlertDialog.Builder setNeutralButton(int, android.content.DialogInterface.OnClickListener); method public android.app.AlertDialog.Builder setNeutralButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener); method public android.app.AlertDialog.Builder setOnCancelListener(android.content.DialogInterface.OnCancelListener); method public android.app.AlertDialog.Builder setOnDismissListener(android.content.DialogInterface.OnDismissListener); method public android.app.AlertDialog.Builder setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener); method public android.app.AlertDialog.Builder setOnKeyListener(android.content.DialogInterface.OnKeyListener); method public android.app.AlertDialog.Builder setPositiveButton(int, android.content.DialogInterface.OnClickListener);
core/java/android/app/AlertDialog.java +18 −0 Original line number Diff line number Diff line Loading @@ -566,7 +566,14 @@ public class AlertDialog extends Dialog implements DialogInterface { /** * Sets the callback that will be called if the dialog is canceled. * * <p>Even in a cancelable dialog, the dialog may be dismissed for reasons other than * being canceled or one of the supplied choices being selected. * If you are interested in listening for all cases where the dialog is dismissed * and not just when it is canceled, see * {@link #setOnDismissListener(android.content.DialogInterface.OnDismissListener) setOnDismissListener}.</p> * @see #setCancelable(boolean) * @see #setOnDismissListener(android.content.DialogInterface.OnDismissListener) * * @return This Builder object to allow for chaining of calls to set methods */ Loading @@ -575,6 +582,16 @@ public class AlertDialog extends Dialog implements DialogInterface { return this; } /** * Sets the callback that will be called when the dialog is dismissed for any reason. * * @return This Builder object to allow for chaining of calls to set methods */ public Builder setOnDismissListener(OnDismissListener onDismissListener) { P.mOnDismissListener = onDismissListener; return this; } /** * Sets the callback that will be called if a key is dispatched to the dialog. * Loading Loading @@ -917,6 +934,7 @@ public class AlertDialog extends Dialog implements DialogInterface { dialog.setCanceledOnTouchOutside(true); } dialog.setOnCancelListener(P.mOnCancelListener); dialog.setOnDismissListener(P.mOnDismissListener); if (P.mOnKeyListener != null) { dialog.setOnKeyListener(P.mOnKeyListener); } Loading
core/java/android/app/Dialog.java +6 −4 Original line number Diff line number Diff line Loading @@ -1106,10 +1106,12 @@ public class Dialog implements DialogInterface, Window.Callback, /** * Set a listener to be invoked when the dialog is canceled. * <p> * This will only be invoked when the dialog is canceled, if the creator * needs to know when it is dismissed in general, use * {@link #setOnDismissListener}. * * <p>This will only be invoked when the dialog is canceled. * Cancel events alone will not capture all ways that * the dialog might be dismissed. If the creator needs * to know when a dialog is dismissed in general, use * {@link #setOnDismissListener}.</p> * * @param listener The {@link DialogInterface.OnCancelListener} to use. */ Loading
core/java/com/android/internal/app/AlertController.java +1 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,7 @@ public class AlertController { public DialogInterface.OnClickListener mNeutralButtonListener; public boolean mCancelable; public DialogInterface.OnCancelListener mOnCancelListener; public DialogInterface.OnDismissListener mOnDismissListener; public DialogInterface.OnKeyListener mOnKeyListener; public CharSequence[] mItems; public ListAdapter mAdapter; Loading