Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -32584,6 +32584,7 @@ package android.view { method public void dispatchWindowSystemUiVisiblityChanged(int); method public void dispatchWindowVisibilityChanged(int); method public void draw(android.graphics.Canvas); method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); core/java/android/view/View.java +17 −17 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region; import android.graphics.Shader; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.hardware.display.DisplayManagerGlobal; Loading Loading @@ -4822,20 +4821,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final float x = r.exactCenterX(); final float y = r.exactCenterY(); setDrawableHotspot(x, y); } /** * Sets the hotspot position for this View's drawables. * * @param x hotspot x coordinate * @param y hotspot y coordinate * @hide */ protected void setDrawableHotspot(float x, float y) { if (mBackground != null) { mBackground.setHotspot(x, y); } drawableHotspotChanged(x, y); } /** Loading Loading @@ -6798,7 +6784,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private void setPressed(boolean pressed, float x, float y) { if (pressed) { setDrawableHotspot(x, y); drawableHotspotChanged(x, y); } setPressed(pressed); Loading Loading @@ -9149,7 +9135,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, break; case MotionEvent.ACTION_MOVE: setDrawableHotspot(x, y); drawableHotspotChanged(x, y); // Be lenient about moving outside of buttons if (!pointInView(x, y, mTouchSlop)) { Loading Loading @@ -15530,6 +15516,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * This function is called whenever the drawable hotspot changes. * <p> * Be sure to call through to the superclass when overriding this function. * * @param x hotspot x coordinate * @param y hotspot y coordinate */ public void drawableHotspotChanged(float x, float y) { if (mBackground != null) { mBackground.setHotspot(x, y); } } /** * Call this to force a view to update its drawable state. This will cause * drawableStateChanged to be called on this view. Views that are interested core/java/android/widget/AbsSeekBar.java +10 −25 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.graphics.Canvas; import android.graphics.Insets; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.PorterDuff.Mode; import android.graphics.Region.Op; import android.graphics.drawable.Drawable; import android.os.Bundle; Loading Loading @@ -343,7 +342,10 @@ public abstract class AbsSeekBar extends ProgressBar { @Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (mThumb != null) mThumb.jumpToCurrentState(); if (mThumb != null) { mThumb.jumpToCurrentState(); } } @Override Loading @@ -361,29 +363,12 @@ public abstract class AbsSeekBar extends ProgressBar { } } /** @hide */ @Override protected void setDrawableHotspot(float x, float y) { super.setDrawableHotspot(x, y); final Drawable progressDrawable = getProgressDrawable(); if (progressDrawable != null) { progressDrawable.setHotspot(x, y); } final Drawable thumb = mThumb; if (thumb != null) { thumb.setHotspot(x, y); } } @Override public void invalidateDrawable(Drawable dr) { super.invalidateDrawable(dr); public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); if (dr == mThumb) { // Handle changes to thumb width and height. requestLayout(); if (mThumb != null) { mThumb.setHotspot(x, y); } } Loading Loading @@ -479,7 +464,7 @@ public abstract class AbsSeekBar extends ProgressBar { final Drawable background = getBackground(); if (background != null) { final Rect bounds = mThumb.getBounds(); final Rect bounds = thumb.getBounds(); final int offsetX = mPaddingLeft - mThumbOffset; final int offsetY = mPaddingTop; background.setHotspotBounds(left + offsetX, bounds.top + offsetY, Loading @@ -505,8 +490,8 @@ public abstract class AbsSeekBar extends ProgressBar { @Override protected synchronized void onDraw(Canvas canvas) { super.onDraw(canvas); drawThumb(canvas); } @Override Loading core/java/android/widget/CheckedTextView.java +2 −3 Original line number Diff line number Diff line Loading @@ -307,10 +307,9 @@ public class CheckedTextView extends TextView implements Checkable { } } /** @hide */ @Override protected void setDrawableHotspot(float x, float y) { super.setDrawableHotspot(x, y); public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); if (mCheckMarkDrawable != null) { mCheckMarkDrawable.setHotspot(x, y); Loading core/java/android/widget/CompoundButton.java +2 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -431,10 +430,9 @@ public abstract class CompoundButton extends Button implements Checkable { } } /** @hide */ @Override protected void setDrawableHotspot(float x, float y) { super.setDrawableHotspot(x, y); public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); if (mButtonDrawable != null) { mButtonDrawable.setHotspot(x, y); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -32584,6 +32584,7 @@ package android.view { method public void dispatchWindowSystemUiVisiblityChanged(int); method public void dispatchWindowVisibilityChanged(int); method public void draw(android.graphics.Canvas); method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int);
core/java/android/view/View.java +17 −17 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Region; import android.graphics.Shader; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.hardware.display.DisplayManagerGlobal; Loading Loading @@ -4822,20 +4821,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final float x = r.exactCenterX(); final float y = r.exactCenterY(); setDrawableHotspot(x, y); } /** * Sets the hotspot position for this View's drawables. * * @param x hotspot x coordinate * @param y hotspot y coordinate * @hide */ protected void setDrawableHotspot(float x, float y) { if (mBackground != null) { mBackground.setHotspot(x, y); } drawableHotspotChanged(x, y); } /** Loading Loading @@ -6798,7 +6784,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private void setPressed(boolean pressed, float x, float y) { if (pressed) { setDrawableHotspot(x, y); drawableHotspotChanged(x, y); } setPressed(pressed); Loading Loading @@ -9149,7 +9135,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, break; case MotionEvent.ACTION_MOVE: setDrawableHotspot(x, y); drawableHotspotChanged(x, y); // Be lenient about moving outside of buttons if (!pointInView(x, y, mTouchSlop)) { Loading Loading @@ -15530,6 +15516,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * This function is called whenever the drawable hotspot changes. * <p> * Be sure to call through to the superclass when overriding this function. * * @param x hotspot x coordinate * @param y hotspot y coordinate */ public void drawableHotspotChanged(float x, float y) { if (mBackground != null) { mBackground.setHotspot(x, y); } } /** * Call this to force a view to update its drawable state. This will cause * drawableStateChanged to be called on this view. Views that are interested
core/java/android/widget/AbsSeekBar.java +10 −25 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.graphics.Canvas; import android.graphics.Insets; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.PorterDuff.Mode; import android.graphics.Region.Op; import android.graphics.drawable.Drawable; import android.os.Bundle; Loading Loading @@ -343,7 +342,10 @@ public abstract class AbsSeekBar extends ProgressBar { @Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (mThumb != null) mThumb.jumpToCurrentState(); if (mThumb != null) { mThumb.jumpToCurrentState(); } } @Override Loading @@ -361,29 +363,12 @@ public abstract class AbsSeekBar extends ProgressBar { } } /** @hide */ @Override protected void setDrawableHotspot(float x, float y) { super.setDrawableHotspot(x, y); final Drawable progressDrawable = getProgressDrawable(); if (progressDrawable != null) { progressDrawable.setHotspot(x, y); } final Drawable thumb = mThumb; if (thumb != null) { thumb.setHotspot(x, y); } } @Override public void invalidateDrawable(Drawable dr) { super.invalidateDrawable(dr); public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); if (dr == mThumb) { // Handle changes to thumb width and height. requestLayout(); if (mThumb != null) { mThumb.setHotspot(x, y); } } Loading Loading @@ -479,7 +464,7 @@ public abstract class AbsSeekBar extends ProgressBar { final Drawable background = getBackground(); if (background != null) { final Rect bounds = mThumb.getBounds(); final Rect bounds = thumb.getBounds(); final int offsetX = mPaddingLeft - mThumbOffset; final int offsetY = mPaddingTop; background.setHotspotBounds(left + offsetX, bounds.top + offsetY, Loading @@ -505,8 +490,8 @@ public abstract class AbsSeekBar extends ProgressBar { @Override protected synchronized void onDraw(Canvas canvas) { super.onDraw(canvas); drawThumb(canvas); } @Override Loading
core/java/android/widget/CheckedTextView.java +2 −3 Original line number Diff line number Diff line Loading @@ -307,10 +307,9 @@ public class CheckedTextView extends TextView implements Checkable { } } /** @hide */ @Override protected void setDrawableHotspot(float x, float y) { super.setDrawableHotspot(x, y); public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); if (mCheckMarkDrawable != null) { mCheckMarkDrawable.setHotspot(x, y); Loading
core/java/android/widget/CompoundButton.java +2 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -431,10 +430,9 @@ public abstract class CompoundButton extends Button implements Checkable { } } /** @hide */ @Override protected void setDrawableHotspot(float x, float y) { super.setDrawableHotspot(x, y); public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); if (mButtonDrawable != null) { mButtonDrawable.setHotspot(x, y); Loading