summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common/list/ContactListItemView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/contacts/common/list/ContactListItemView.java')
-rw-r--r--src/com/android/contacts/common/list/ContactListItemView.java73
1 files changed, 2 insertions, 71 deletions
diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java
index d8c42ad5..7916e636 100644
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -163,7 +163,6 @@ public class ContactListItemView extends ViewGroup
private TextView mPhoneticNameTextView;
private TextView mLabelView;
private TextView mDataView;
- private TextView mCallProviderView;
private TextView mSnippetView;
private TextView mStatusView;
private ImageView mPresenceIcon;
@@ -206,8 +205,6 @@ public class ContactListItemView extends ViewGroup
private int mPhoneticNameTextViewHeight;
private int mLabelViewHeight;
private int mDataViewHeight;
- private int mCallProviderViewHeight;
- private int mCallProviderBottomPadding;
private int mSnippetTextViewHeight;
private int mStatusTextViewHeight;
private int mCheckBoxHeight;
@@ -340,8 +337,6 @@ public class ContactListItemView extends ViewGroup
mStatusTextViewHeight = 0;
mCheckBoxWidth = 0;
mCheckBoxHeight = 0;
- mCallProviderViewHeight = 0;
- mCallProviderBottomPadding = 0;
ensurePhotoViewSize();
@@ -420,17 +415,6 @@ public class ContactListItemView extends ViewGroup
mDataViewHeight = mDataView.getMeasuredHeight();
}
- if (isVisible(mCallProviderView)) {
- mCallProviderView.measure(MeasureSpec.makeMeasureSpec(dataWidth, MeasureSpec.EXACTLY),
- MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
-
- // Multiply our height by two + gap
- // Why? cause padding below and above the text + text height
- mCallProviderViewHeight = mCallProviderView.getMeasuredHeight();
- mCallProviderBottomPadding = getContext().getResources()
- .getDimensionPixelSize(R.dimen.call_provider_bottom_padding);
- }
-
if (isVisible(mLabelView)) {
// For performance reason we don't want AT_MOST usually, but when the picture is
// on right, we need to use it anyway because mDataView is next to mLabelView.
@@ -482,11 +466,6 @@ public class ContactListItemView extends ViewGroup
// Make sure height is at least the preferred height
height = Math.max(height, preferredHeight);
- if (isVisible(mCallProviderView)) {
- // add callproviderviewheight;
- height += mCallProviderViewHeight + mCallProviderBottomPadding;
- }
-
// Measure the header if it is visible.
if (mHeaderTextView != null && mHeaderTextView.getVisibility() == VISIBLE) {
mHeaderTextView.measure(
@@ -564,8 +543,7 @@ public class ContactListItemView extends ViewGroup
// Photo is the left most view. All the other Views should on the right of the photo.
if (photoView != null) {
// Center the photo vertically
- int photoTop = (topBound + (bottomBound - topBound - mPhotoViewHeight -
- mCallProviderViewHeight - mCallProviderBottomPadding) / 2);
+ int photoTop = (topBound + (bottomBound - topBound - mPhotoViewHeight) / 2);
photoView.layout(
leftBound,
photoTop,
@@ -598,8 +576,7 @@ public class ContactListItemView extends ViewGroup
// Center text vertically, then apply the top offset.
final int totalTextHeight = mNameTextViewHeight + mPhoneticNameTextViewHeight +
- mLabelAndDataViewMaxHeight + mSnippetTextViewHeight + mStatusTextViewHeight
- + mCallProviderViewHeight + mCallProviderBottomPadding;
+ mLabelAndDataViewMaxHeight + mSnippetTextViewHeight + mStatusTextViewHeight;
int textTopBound = (bottomBound + topBound - totalTextHeight) / 2 + mTextOffsetTop;
// Layout all text view and presence icon
@@ -705,13 +682,6 @@ public class ContactListItemView extends ViewGroup
textTopBound += mLabelAndDataViewMaxHeight;
}
- if (isVisible(mCallProviderView)) {
- mCallProviderView.layout(dataLeftBound,
- textTopBound + mCallProviderBottomPadding,
- rightBound,
- textTopBound + mCallProviderViewHeight + mCallProviderBottomPadding);
- }
-
if (isVisible(mSnippetView)) {
mSnippetView.layout(leftBound,
textTopBound,
@@ -1078,27 +1048,6 @@ public class ContactListItemView extends ViewGroup
}
}
- /**
- * Sets phone number for a list item.
- */
- public void setExtraNumber(String text) {
- if (TextUtils.isEmpty(text)) {
- if (mCallProviderView != null) {
- mCallProviderView.setVisibility(View.GONE);
- }
- } else {
- getCallProviderView();
-
- final SpannableString textToSet = new SpannableString(text);
- setMarqueeText(mCallProviderView, textToSet);
- mCallProviderView.setVisibility(VISIBLE);
-
- // We have a phone number as "mDataView" so make it always LTR and VIEW_START
- mCallProviderView.setTextDirection(View.TEXT_DIRECTION_LTR);
- mCallProviderView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
- }
- }
-
private void setMarqueeText(TextView textView, char[] text, int size) {
if (getTextEllipsis() == TruncateAt.MARQUEE) {
setMarqueeText(textView, new String(text, 0, size));
@@ -1152,24 +1101,6 @@ public class ContactListItemView extends ViewGroup
}
/**
- * Returns the text view for the data text, creating it if necessary.
- */
- public TextView getCallProviderView() {
- if (mCallProviderView == null) {
- mCallProviderView = new TextView(getContext());
- mCallProviderView.setSingleLine(true);
- mCallProviderView.setEllipsize(getTextEllipsis());
- mCallProviderView.setTextAppearance(getContext(), R.style.TextAppearanceSmall);
- mCallProviderView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
- mCallProviderView.setActivated(isActivated());
- mCallProviderView.setId(R.id.cliv_data_view);
- mCallProviderView.setElegantTextHeight(false);
- addView(mCallProviderView);
- }
- return mCallProviderView;
- }
-
- /**
* Adds or updates a text view for the search snippet.
*/
public void setSnippet(String text) {