| Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java
|
| index 28b151dbb961b6f83dded829e6777e9e0cc46f49..e1b8395a6c448eeb42154fab10bf7799bd338dbb 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java
|
| @@ -45,8 +45,8 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
|
| private float mAnchorHeight;
|
| private float mAnchorX;
|
| private float mAnchorY;
|
| - private Paint mNameViewPaint;
|
| private Paint mLabelViewPaint;
|
| + private Paint mSublabelViewPaint;
|
| private OnLayoutChangeListener mLayoutChangeListener;
|
|
|
| /**
|
| @@ -159,14 +159,14 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
|
| * @return The popup window width in DIP.
|
| */
|
| private float getDesiredWidth(AutofillSuggestion[] data) {
|
| - if (mNameViewPaint == null || mLabelViewPaint == null) {
|
| + if (mLabelViewPaint == null || mSublabelViewPaint == null) {
|
| LayoutInflater inflater =
|
| (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
| View layout = inflater.inflate(R.layout.autofill_text, null);
|
| - TextView nameView = (TextView) layout.findViewById(R.id.autofill_name);
|
| - mNameViewPaint = nameView.getPaint();
|
| TextView labelView = (TextView) layout.findViewById(R.id.autofill_label);
|
| mLabelViewPaint = labelView.getPaint();
|
| + TextView sublabelView = (TextView) layout.findViewById(R.id.autofill_sublabel);
|
| + mSublabelViewPaint = sublabelView.getPaint();
|
| }
|
|
|
| float maxTextWidth = 0;
|
| @@ -175,12 +175,12 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
|
| bounds.setEmpty();
|
| String name = data[i].mName;
|
| float width = 0;
|
| - mNameViewPaint.getTextBounds(name, 0, name.length(), bounds);
|
| + mLabelViewPaint.getTextBounds(name, 0, name.length(), bounds);
|
| width += bounds.width();
|
|
|
| bounds.setEmpty();
|
| String label = data[i].mLabel;
|
| - mLabelViewPaint.getTextBounds(label, 0, label.length(), bounds);
|
| + mSublabelViewPaint.getTextBounds(label, 0, label.length(), bounds);
|
| width += bounds.width();
|
| maxTextWidth = Math.max(width, maxTextWidth);
|
| }
|
|
|