summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common/list/ContactListItemView.java
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-06-11 17:02:21 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-11 17:02:21 +0000
commitd2777cefe658ceccafa853c7c3ae9a4fd5d9898c (patch)
treef57ccd0ce7622e4b5c62fc486ddfee8c69f6cc63 /src/com/android/contacts/common/list/ContactListItemView.java
parentba1570270d04f1e34d070e6e66ca3a92ec6be463 (diff)
parent84f6ef0cfd5ef768b14119952df7b8f2fa0a02ee (diff)
downloadandroid_packages_apps_ContactsCommon-d2777cefe658ceccafa853c7c3ae9a4fd5d9898c.tar.gz
android_packages_apps_ContactsCommon-d2777cefe658ceccafa853c7c3ae9a4fd5d9898c.tar.bz2
android_packages_apps_ContactsCommon-d2777cefe658ceccafa853c7c3ae9a4fd5d9898c.zip
am 84f6ef0c: Merge "Add support for full-bleed selection of contact list items." into lmp-preview-dev
* commit '84f6ef0cfd5ef768b14119952df7b8f2fa0a02ee': Add support for full-bleed selection of contact list items.
Diffstat (limited to 'src/com/android/contacts/common/list/ContactListItemView.java')
-rw-r--r--src/com/android/contacts/common/list/ContactListItemView.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java
index 04acfb52..4abdf7ec 100644
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -210,6 +210,7 @@ public class ContactListItemView extends ViewGroup
private final CharArrayBuffer mPhoneticNameBuffer = new CharArrayBuffer(128);
private boolean mActivatedStateSupported;
+ private boolean mAdjustSelectionBoundsEnabled = true;
private Rect mBoundsWithoutHeader = new Rect();
@@ -635,10 +636,12 @@ public class ContactListItemView extends ViewGroup
@Override
public void adjustListItemSelectionBounds(Rect bounds) {
- bounds.top += mBoundsWithoutHeader.top;
- bounds.bottom = bounds.top + mBoundsWithoutHeader.height();
- bounds.left = mBoundsWithoutHeader.left;
- bounds.right = mBoundsWithoutHeader.right;
+ if (mAdjustSelectionBoundsEnabled) {
+ bounds.top += mBoundsWithoutHeader.top;
+ bounds.bottom = bounds.top + mBoundsWithoutHeader.height();
+ bounds.left = mBoundsWithoutHeader.left;
+ bounds.right = mBoundsWithoutHeader.right;
+ }
}
protected boolean isVisible(View view) {
@@ -1390,6 +1393,10 @@ public class ContactListItemView extends ViewGroup
this.mActivatedStateSupported = flag;
}
+ public void setAdjustSelectionBoundsEnabled(boolean enabled) {
+ mAdjustSelectionBoundsEnabled = enabled;
+ }
+
@Override
public void requestLayout() {
// We will assume that once measured this will not need to resize