summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/DialogInterface.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:43 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:43 -0800
commitf013e1afd1e68af5e3b868c26a653bbfb39538f8 (patch)
tree7ad6c8fd9c7b55f4b4017171dec1cb760bbd26bf /core/java/android/content/DialogInterface.java
parente70cfafe580c6f2994c4827cd8a534aabf3eb05c (diff)
downloadframeworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.zip
frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.tar.gz
frameworks_base-f013e1afd1e68af5e3b868c26a653bbfb39538f8.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'core/java/android/content/DialogInterface.java')
-rw-r--r--core/java/android/content/DialogInterface.java41
1 files changed, 36 insertions, 5 deletions
diff --git a/core/java/android/content/DialogInterface.java b/core/java/android/content/DialogInterface.java
index fc94aa6..4afa294 100644
--- a/core/java/android/content/DialogInterface.java
+++ b/core/java/android/content/DialogInterface.java
@@ -22,10 +22,39 @@ import android.view.KeyEvent;
*
*/
public interface DialogInterface {
- public static final int BUTTON1 = -1;
- public static final int BUTTON2 = -2;
- public static final int BUTTON3 = -3;
+ /**
+ * The identifier for the positive button.
+ */
+ public static final int BUTTON_POSITIVE = -1;
+
+ /**
+ * The identifier for the negative button.
+ */
+ public static final int BUTTON_NEGATIVE = -2;
+ /**
+ * The identifier for the neutral button.
+ */
+ public static final int BUTTON_NEUTRAL = -3;
+
+ /**
+ * @deprecated Use {@link #BUTTON_POSITIVE}
+ */
+ @Deprecated
+ public static final int BUTTON1 = BUTTON_POSITIVE;
+
+ /**
+ * @deprecated Use {@link #BUTTON_NEGATIVE}
+ */
+ @Deprecated
+ public static final int BUTTON2 = BUTTON_NEGATIVE;
+
+ /**
+ * @deprecated Use {@link #BUTTON_NEUTRAL}
+ */
+ @Deprecated
+ public static final int BUTTON3 = BUTTON_NEUTRAL;
+
public void cancel();
public void dismiss();
@@ -71,9 +100,11 @@ public interface DialogInterface {
* This method will be invoked when a button in the dialog is clicked.
*
* @param dialog The dialog that received the click.
- * @param which The button that was clicked, i.e. BUTTON1 or BUTTON2 or
- * the position of the item clicked.
+ * @param which The button that was clicked (e.g.
+ * {@link DialogInterface#BUTTON1}) or the position
+ * of the item clicked.
*/
+ /* TODO: Change to use BUTTON_POSITIVE after API council */
public void onClick(DialogInterface dialog, int which);
}