diff options
author | Richard MacGregor <rmacgregor@cyngn.com> | 2016-04-29 10:36:53 -0700 |
---|---|---|
committer | Richard MacGregor <rmacgregor@cyngn.com> | 2016-04-29 13:58:38 -0700 |
commit | 849685b3020654a9a93fee81e89ea6012941804d (patch) | |
tree | f40bc679aa8d212dcbd00f93c946128f449b1059 /src/com/android/contacts/common/list/ContactListItemView.java | |
parent | 510605fc0a4d02e5f26cd8047df7749ab9c8e8a1 (diff) | |
download | android_packages_apps_ContactsCommon-849685b3020654a9a93fee81e89ea6012941804d.tar.gz android_packages_apps_ContactsCommon-849685b3020654a9a93fee81e89ea6012941804d.tar.bz2 android_packages_apps_ContactsCommon-849685b3020654a9a93fee81e89ea6012941804d.zip |
Fix height calculation of ContactListItemView
Height calculation compared height without padding against preferred
height that included padding.
Existing comments stated that a height calculation was supposed to
includepadding, but didn't. Add the padding back into the calculation.
To test this:
- Include an app that reports a contact's presence, and therefore shows
the presence icon.
- Make sure contact also has an email or similar. Open contacts app and
search for the email address.
- Three rows of information should show up for that contact, those being
Name, Presence, and email.
The issue fixed is that the top and bottom text is cutoff due to bad
height calculation.
Ticket CD-576
Change-Id: I9a639ec0d505e679e36bd1a5a4097aa808e7c320
Diffstat (limited to 'src/com/android/contacts/common/list/ContactListItemView.java')
-rw-r--r-- | src/com/android/contacts/common/list/ContactListItemView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java index 7916e636..e6bc563a 100644 --- a/src/com/android/contacts/common/list/ContactListItemView.java +++ b/src/com/android/contacts/common/list/ContactListItemView.java @@ -458,7 +458,8 @@ public class ContactListItemView extends ViewGroup // Calculate height including padding. int height = (mNameTextViewHeight + mPhoneticNameTextViewHeight + - mLabelAndDataViewMaxHeight + mSnippetTextViewHeight + mStatusTextViewHeight); + mLabelAndDataViewMaxHeight + mSnippetTextViewHeight + mStatusTextViewHeight) + + getPaddingBottom() + getPaddingTop(); // Make sure the height is at least as high as the photo height = Math.max(height, mPhotoViewHeight + getPaddingBottom() + getPaddingTop()); |