OSDN Git Service

Revert "Remove View.setTooltip/getTooltip"
authorVladislav Kaznacheev <kaznacheev@google.com>
Tue, 24 Jan 2017 22:17:42 +0000 (22:17 +0000)
committerVladislav Kaznacheev <kaznacheev@google.com>
Tue, 24 Jan 2017 22:17:42 +0000 (22:17 +0000)
This reverts commit 3da84b4e3c5c7af65572304c7f1fe3fc81f6265d.

Change-Id: Ie6f29f6527d71f564906b4cc05b344823c73c3f2

api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/view/View.java

index 69efae6..637cdac 100644 (file)
@@ -43694,6 +43694,7 @@ package android.view {
     method public java.lang.Object getTag(int);
     method public int getTextAlignment();
     method public int getTextDirection();
+    method public final deprecated java.lang.CharSequence getTooltip();
     method public final java.lang.CharSequence getTooltipText();
     method public final int getTop();
     method protected float getTopFadingEdgeStrength();
@@ -43995,6 +43996,7 @@ package android.view {
     method public void setTag(int, java.lang.Object);
     method public void setTextAlignment(int);
     method public void setTextDirection(int);
+    method public final deprecated void setTooltip(java.lang.CharSequence);
     method public final void setTooltipText(java.lang.CharSequence);
     method public final void setTop(int);
     method public void setTouchDelegate(android.view.TouchDelegate);
index 814bb5f..f0e9ff5 100644 (file)
@@ -46996,6 +46996,7 @@ package android.view {
     method public java.lang.Object getTag(int);
     method public int getTextAlignment();
     method public int getTextDirection();
+    method public final deprecated java.lang.CharSequence getTooltip();
     method public final java.lang.CharSequence getTooltipText();
     method public final int getTop();
     method protected float getTopFadingEdgeStrength();
@@ -47297,6 +47298,7 @@ package android.view {
     method public void setTag(int, java.lang.Object);
     method public void setTextAlignment(int);
     method public void setTextDirection(int);
+    method public final deprecated void setTooltip(java.lang.CharSequence);
     method public final void setTooltipText(java.lang.CharSequence);
     method public final void setTop(int);
     method public void setTouchDelegate(android.view.TouchDelegate);
index 76edc0d..c4081f0 100644 (file)
@@ -43985,6 +43985,7 @@ package android.view {
     method public java.lang.Object getTag(int);
     method public int getTextAlignment();
     method public int getTextDirection();
+    method public final deprecated java.lang.CharSequence getTooltip();
     method public final java.lang.CharSequence getTooltipText();
     method public android.view.View getTooltipView();
     method public final int getTop();
@@ -44287,6 +44288,7 @@ package android.view {
     method public void setTag(int, java.lang.Object);
     method public void setTextAlignment(int);
     method public void setTextDirection(int);
+    method public final deprecated void setTooltip(java.lang.CharSequence);
     method public final void setTooltipText(java.lang.CharSequence);
     method public final void setTop(int);
     method public void setTouchDelegate(android.view.TouchDelegate);
index 787132c..26e311c 100644 (file)
@@ -24664,6 +24664,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     }
 
     /**
+     * To be removed once the support library has stopped using it.
+     *
+     * @deprecated use {@link #setTooltipText} instead
+     */
+    @Deprecated
+    public final void setTooltip(@Nullable CharSequence tooltipText) {
+        setTooltipText(tooltipText);
+    }
+
+    /**
      * Returns the view's tooltip text.
      *
      * @return the tooltip text
@@ -24673,6 +24683,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
         return mTooltipInfo != null ? mTooltipInfo.mTooltipText : null;
     }
 
+    /**
+     * To be removed once the support library has stopped using it.
+     *
+     * @deprecated use {@link #getTooltipText} instead
+     */
+    @Deprecated
+    @Nullable
+    public final CharSequence getTooltip() {
+        return getTooltipText();
+    }
+
     private boolean showTooltip(int x, int y, boolean fromLongClick) {
         if (mAttachInfo == null) {
             return false;