summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common/list/ContactListItemView.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-12-03 13:55:34 -0800
committerYorke Lee <yorkelee@google.com>2013-12-03 13:55:34 -0800
commitbded9d078784569efef4aec2d636ce3f733601d7 (patch)
treea034adc31550c1f2005e143a7165a038162b9850 /src/com/android/contacts/common/list/ContactListItemView.java
parent888e8cbb7d0430e5271c18ad1ed53fd3d71545b5 (diff)
downloadandroid_packages_apps_ContactsCommon-bded9d078784569efef4aec2d636ce3f733601d7.tar.gz
android_packages_apps_ContactsCommon-bded9d078784569efef4aec2d636ce3f733601d7.tar.bz2
android_packages_apps_ContactsCommon-bded9d078784569efef4aec2d636ce3f733601d7.zip
Copy private pointInView method to ContactListItemView
Bug: 6948882 Change-Id: Ieef3d4c8933eacea59fe5a5398edc5ba0141fd2c
Diffstat (limited to 'src/com/android/contacts/common/list/ContactListItemView.java')
-rw-r--r--src/com/android/contacts/common/list/ContactListItemView.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java
index 9c30cb67..9fdb24d6 100644
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -1536,10 +1536,15 @@ public class ContactListItemView extends ViewGroup
// If the touch event's coordinates are not within the view's header, then delegate
// to super.onTouchEvent so that regular view behavior is preserved. Otherwise, consume
// and ignore the touch event.
- if (mBoundsWithoutHeader.contains((int) x, (int) y) || !pointInView(x, y, 0)) {
+ if (mBoundsWithoutHeader.contains((int) x, (int) y) || !pointIsInView(x, y)) {
return super.onTouchEvent(event);
} else {
return true;
}
}
+
+ private final boolean pointIsInView(float localX, float localY) {
+ return localX >= 0 && localX < (mRight - mLeft)
+ && localY >= 0 && localY < (mBottom - mTop);
+ }
}