summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common/list/ContactListItemView.java
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-04-22 15:44:37 -0700
committerAndrew Lee <anwlee@google.com>2014-04-22 15:44:42 -0700
commitf4fcd3def28e5b1168f5160e476c05ad69339adc (patch)
treed5f1ac3e27fd13875e962eace4f0aa35114f6b87 /src/com/android/contacts/common/list/ContactListItemView.java
parentb49193d619da7e06b8cba41e443913825f6464f5 (diff)
downloadandroid_packages_apps_ContactsCommon-f4fcd3def28e5b1168f5160e476c05ad69339adc.tar.gz
android_packages_apps_ContactsCommon-f4fcd3def28e5b1168f5160e476c05ad69339adc.tar.bz2
android_packages_apps_ContactsCommon-f4fcd3def28e5b1168f5160e476c05ad69339adc.zip
Delete contacts list item dividers.
- Delete setDivider method, and associated layout logic. - Delete unneeded list_item_divider attribute. Bug: 13956531 Change-Id: I56d471ae637346cb6a1b9a56c6c43de2da603256
Diffstat (limited to 'src/com/android/contacts/common/list/ContactListItemView.java')
-rw-r--r--src/com/android/contacts/common/list/ContactListItemView.java42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java
index b6aa800a..d8427ae4 100644
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -109,11 +109,6 @@ public class ContactListItemView extends ViewGroup
private int mSelectionBoundsMarginLeft;
private int mSelectionBoundsMarginRight;
- // Horizontal divider between contact views.
- private boolean mHorizontalDividerVisible = true;
- private Drawable mHorizontalDividerDrawable;
- private int mHorizontalDividerHeight;
-
protected static class HighlightSequence {
private final int start;
private final int end;
@@ -250,8 +245,6 @@ public class ContactListItemView extends ViewGroup
R.styleable.ContactListItemView_list_item_height, mPreferredHeight);
mActivatedBackgroundDrawable = a.getDrawable(
R.styleable.ContactListItemView_activated_background);
- mHorizontalDividerDrawable = a.getDrawable(
- R.styleable.ContactListItemView_list_item_divider);
mGapBetweenImageAndText = a.getDimensionPixelOffset(
R.styleable.ContactListItemView_list_item_gap_between_image_and_text,
@@ -312,8 +305,6 @@ public class ContactListItemView extends ViewGroup
mSecondaryTextColor = a.getColorStateList(R.styleable.Theme_android_textColorSecondary);
a.recycle();
- mHorizontalDividerHeight = mHorizontalDividerDrawable.getIntrinsicHeight();
-
if (mActivatedBackgroundDrawable != null) {
mActivatedBackgroundDrawable.setCallback(this);
}
@@ -335,12 +326,7 @@ public class ContactListItemView extends ViewGroup
// We will match parent's width and wrap content vertically, but make sure
// height is no less than listPreferredItemHeight.
final int specWidth = resolveSize(0, widthMeasureSpec);
- final int preferredHeight;
- if (mHorizontalDividerVisible) {
- preferredHeight = mPreferredHeight + mHorizontalDividerHeight;
- } else {
- preferredHeight = mPreferredHeight;
- }
+ final int preferredHeight = mPreferredHeight;
mNameTextViewHeight = 0;
mPhoneticNameTextViewHeight = 0;
@@ -463,11 +449,6 @@ public class ContactListItemView extends ViewGroup
// Make sure the height is at least as high as the photo
height = Math.max(height, mPhotoViewHeight + getPaddingBottom() + getPaddingTop());
- // Add horizontal divider height
- if (mHorizontalDividerVisible) {
- height += mHorizontalDividerHeight;
- }
-
// Make sure height is at least the preferred height
height = Math.max(height, preferredHeight);
@@ -523,16 +504,6 @@ public class ContactListItemView extends ViewGroup
topBound += (mHeaderBackgroundHeight + mHeaderUnderlineHeight);
}
- // Put horizontal divider at the bottom
- if (mHorizontalDividerVisible) {
- mHorizontalDividerDrawable.setBounds(
- leftBound,
- height - mHorizontalDividerHeight,
- rightBound,
- height);
- bottomBound -= mHorizontalDividerHeight;
- }
-
mBoundsWithoutHeader.set(0, topBound, width, bottomBound);
if (mActivatedStateSupported && isActivated()) {
@@ -758,22 +729,11 @@ public class ContactListItemView extends ViewGroup
if (mActivatedStateSupported && isActivated()) {
mActivatedBackgroundDrawable.draw(canvas);
}
- if (mHorizontalDividerVisible) {
- mHorizontalDividerDrawable.draw(canvas);
- }
super.dispatchDraw(canvas);
}
/**
- * Sets the flag that determines whether a divider should drawn at the bottom
- * of the view.
- */
- public void setDividerVisible(boolean visible) {
- mHorizontalDividerVisible = visible;
- }
-
- /**
* Sets section header or makes it invisible if the title is null.
*/
public void setSectionHeader(String title) {