diff options
author | Adam Powell <adamp@google.com> | 2010-10-02 17:49:07 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-02 17:49:07 -0700 |
commit | 077c79cb43c3b6059a92ba1eb51af94972adadef (patch) | |
tree | 4db4c1208b1b3e54df4c7a565c2e1e10ac064d9b | |
parent | 0d843dc47929ff6e3dbaa4cc1d07de7fbdba8506 (diff) | |
parent | 03876c905f3874f3ac8deb5a23ee0f77d4c04bab (diff) | |
download | frameworks_base-077c79cb43c3b6059a92ba1eb51af94972adadef.zip frameworks_base-077c79cb43c3b6059a92ba1eb51af94972adadef.tar.gz frameworks_base-077c79cb43c3b6059a92ba1eb51af94972adadef.tar.bz2 |
am 03876c90: Fix text anchor fade-out positioning
Merge commit '03876c905f3874f3ac8deb5a23ee0f77d4c04bab' into gingerbread-plus-aosp
* commit '03876c905f3874f3ac8deb5a23ee0f77d4c04bab':
Fix text anchor fade-out positioning
-rw-r--r-- | core/java/android/widget/TextView.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 75edfaa..c6f2754 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7725,19 +7725,18 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final int compoundPaddingRight = getCompoundPaddingRight(); final TextView hostView = TextView.this; - final int handleWidth = mDrawable.getIntrinsicWidth(); final int left = 0; final int right = hostView.getWidth(); final int top = 0; final int bottom = hostView.getHeight(); - final int clipLeft = left + compoundPaddingLeft - (int) (handleWidth * 0.75f); + final int clipLeft = left + compoundPaddingLeft; final int clipTop = top + extendedPaddingTop; - final int clipRight = right - compoundPaddingRight + (int) (handleWidth * 0.25f); + final int clipRight = right - compoundPaddingRight; final int clipBottom = bottom - extendedPaddingBottom; - return mPositionX >= clipLeft && mPositionX <= clipRight && - mPositionY >= clipTop && mPositionY <= clipBottom; + return mPositionX + mHotspotX >= clipLeft && mPositionX + mHotspotX <= clipRight && + mPositionY + mHotspotY >= clipTop && mPositionY + mHotspotY <= clipBottom; } private void moveTo(int x, int y) { |