Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 745677f1 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Clean up AlertDialog javadocs, add overlay theme for dialogs"

parents 6e53931f 49f118ef
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -2019,6 +2019,7 @@ package android {
    field public static final int ThemeOverlay_Material_ActionBar = 16974409; // 0x1030249
    field public static final int ThemeOverlay_Material_Dark = 16974411; // 0x103024b
    field public static final int ThemeOverlay_Material_Dark_ActionBar = 16974412; // 0x103024c
    field public static final int ThemeOverlay_Material_Dialog = 16974564; // 0x10302e4
    field public static final int ThemeOverlay_Material_Light = 16974410; // 0x103024a
    field public static final int Theme_Black = 16973832; // 0x1030008
    field public static final int Theme_Black_NoTitleBar = 16973833; // 0x1030009
@@ -3746,8 +3747,8 @@ package android.app {
  public class AlertDialog extends android.app.Dialog implements android.content.DialogInterface {
    ctor protected AlertDialog(android.content.Context);
    ctor protected AlertDialog(android.content.Context, int);
    ctor protected AlertDialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener);
    ctor protected AlertDialog(android.content.Context, int);
    method public android.widget.Button getButton(int);
    method public android.widget.ListView getListView();
    method public void setButton(int, java.lang.CharSequence, android.os.Message);
@@ -3766,11 +3767,11 @@ package android.app {
    method public void setMessage(java.lang.CharSequence);
    method public void setView(android.view.View);
    method public void setView(android.view.View, int, int, int, int);
    field public static final int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
    field public static final int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
    field public static final int THEME_HOLO_DARK = 2; // 0x2
    field public static final int THEME_HOLO_LIGHT = 3; // 0x3
    field public static final int THEME_TRADITIONAL = 1; // 0x1
    field public static final deprecated int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
    field public static final deprecated int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
    field public static final deprecated int THEME_HOLO_DARK = 2; // 0x2
    field public static final deprecated int THEME_HOLO_LIGHT = 3; // 0x3
    field public static final deprecated int THEME_TRADITIONAL = 1; // 0x1
  }
  public static class AlertDialog.Builder {
@@ -3785,7 +3786,7 @@ package android.app {
    method public android.app.AlertDialog.Builder setIcon(int);
    method public android.app.AlertDialog.Builder setIcon(android.graphics.drawable.Drawable);
    method public android.app.AlertDialog.Builder setIconAttribute(int);
    method public android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
    method public deprecated android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
    method public android.app.AlertDialog.Builder setItems(int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setItems(java.lang.CharSequence[], android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setMessage(int);
+8 −7
Original line number Diff line number Diff line
@@ -2097,6 +2097,7 @@ package android {
    field public static final int ThemeOverlay_Material_ActionBar = 16974409; // 0x1030249
    field public static final int ThemeOverlay_Material_Dark = 16974411; // 0x103024b
    field public static final int ThemeOverlay_Material_Dark_ActionBar = 16974412; // 0x103024c
    field public static final int ThemeOverlay_Material_Dialog = 16974564; // 0x10302e4
    field public static final int ThemeOverlay_Material_Light = 16974410; // 0x103024a
    field public static final int Theme_Black = 16973832; // 0x1030008
    field public static final int Theme_Black_NoTitleBar = 16973833; // 0x1030009
@@ -3835,8 +3836,8 @@ package android.app {
  public class AlertDialog extends android.app.Dialog implements android.content.DialogInterface {
    ctor protected AlertDialog(android.content.Context);
    ctor protected AlertDialog(android.content.Context, int);
    ctor protected AlertDialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener);
    ctor protected AlertDialog(android.content.Context, int);
    method public android.widget.Button getButton(int);
    method public android.widget.ListView getListView();
    method public void setButton(int, java.lang.CharSequence, android.os.Message);
@@ -3855,11 +3856,11 @@ package android.app {
    method public void setMessage(java.lang.CharSequence);
    method public void setView(android.view.View);
    method public void setView(android.view.View, int, int, int, int);
    field public static final int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
    field public static final int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
    field public static final int THEME_HOLO_DARK = 2; // 0x2
    field public static final int THEME_HOLO_LIGHT = 3; // 0x3
    field public static final int THEME_TRADITIONAL = 1; // 0x1
    field public static final deprecated int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
    field public static final deprecated int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
    field public static final deprecated int THEME_HOLO_DARK = 2; // 0x2
    field public static final deprecated int THEME_HOLO_LIGHT = 3; // 0x3
    field public static final deprecated int THEME_TRADITIONAL = 1; // 0x1
  }
  public static class AlertDialog.Builder {
@@ -3874,7 +3875,7 @@ package android.app {
    method public android.app.AlertDialog.Builder setIcon(int);
    method public android.app.AlertDialog.Builder setIcon(android.graphics.drawable.Drawable);
    method public android.app.AlertDialog.Builder setIconAttribute(int);
    method public android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
    method public deprecated android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
    method public android.app.AlertDialog.Builder setItems(int, android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setItems(java.lang.CharSequence[], android.content.DialogInterface.OnClickListener);
    method public android.app.AlertDialog.Builder setMessage(int);
+272 −165

File changed.

Preview size limit exceeded, changes collapsed.

+26 −21
Original line number Diff line number Diff line
@@ -34,10 +34,13 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;

/**
 * An extension to TextView that supports the {@link android.widget.Checkable} interface.
 * This is useful when used in a {@link android.widget.ListView ListView} where the it's 
 * {@link android.widget.ListView#setChoiceMode(int) setChoiceMode} has been set to
 * something other than {@link android.widget.ListView#CHOICE_MODE_NONE CHOICE_MODE_NONE}.
 * An extension to {@link TextView} that supports the {@link Checkable}
 * interface and displays.
 * <p>
 * This is useful when used in a {@link android.widget.ListView ListView} where
 * the {@link android.widget.ListView#setChoiceMode(int) setChoiceMode} has
 * been set to something other than
 * {@link android.widget.ListView#CHOICE_MODE_NONE CHOICE_MODE_NONE}.
 *
 * @attr ref android.R.styleable#CheckedTextView_checked
 * @attr ref android.R.styleable#CheckedTextView_checkMark
@@ -116,9 +119,10 @@ public class CheckedTextView extends TextView implements Checkable {
    }

    /**
     * <p>Changes the checked state of this text view.</p>
     * Sets the checked state of this view.
     *
     * @param checked true to check the text, false to uncheck it
     * @param checked {@code true} set the state to checked, {@code false} to
     *                uncheck
     */
    public void setChecked(boolean checked) {
        if (mChecked != checked) {
@@ -129,24 +133,24 @@ public class CheckedTextView extends TextView implements Checkable {
        }
    }


    /**
     * Set the checkmark to a given Drawable, identified by its resourece id. This will be drawn
     * when {@link #isChecked()} is true.
     *
     * @param resid The Drawable to use for the checkmark.
     * Sets the check mark to the drawable with the specified resource ID.
     * <p>
     * When this view is checked, the drawable's state set will include
     * {@link android.R.attr#state_checked}.
     *
     * @param resId the resource identifier of drawable to use as the check
     *              mark
     * @attr ref android.R.styleable#CheckedTextView_checkMark
     * @see #setCheckMarkDrawable(Drawable)
     * @see #getCheckMarkDrawable()
     *
     * @attr ref android.R.styleable#CheckedTextView_checkMark
     */
    public void setCheckMarkDrawable(@DrawableRes int resid) {
        if (resid != 0 && resid == mCheckMarkResource) {
    public void setCheckMarkDrawable(@DrawableRes int resId) {
        if (resId != 0 && resId == mCheckMarkResource) {
            return;
        }

        mCheckMarkResource = resid;
        mCheckMarkResource = resId;

        Drawable d = null;
        if (mCheckMarkResource != 0) {
@@ -156,14 +160,15 @@ public class CheckedTextView extends TextView implements Checkable {
    }

    /**
     * Set the checkmark to a given Drawable. This will be drawn when {@link #isChecked()} is true.
     *
     * @param d The Drawable to use for the checkmark.
     * Set the check mark to the specified drawable.
     * <p>
     * When this view is checked, the drawable's state set will include
     * {@link android.R.attr#state_checked}.
     *
     * @param d the drawable to use for the check mark
     * @attr ref android.R.styleable#CheckedTextView_checkMark
     * @see #setCheckMarkDrawable(int)
     * @see #getCheckMarkDrawable()
     *
     * @attr ref android.R.styleable#CheckedTextView_checkMark
     */
    public void setCheckMarkDrawable(Drawable d) {
        if (mCheckMarkDrawable != null) {
+1 −0
Original line number Diff line number Diff line
@@ -2634,6 +2634,7 @@
  <public type="style" name="Theme.Material.DayNight.NoActionBar.TranslucentDecor" />
  <public type="style" name="Theme.Material.DayNight.Panel" />
  <public type="style" name="Theme.Material.Light.LightStatusBar" />
  <public type="style" name="ThemeOverlay.Material.Dialog" />

  <!-- Context menu ID for the "Undo" menu item to undo the last text edit operation. -->
  <public type="id" name="undo" />
Loading