Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java |
index 123db1a73b782556f1104bf5c62069cab74458c8..5564f3c85682162095137e06dd89f00fcde37f0f 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillListAdapter.java |
@@ -5,6 +5,7 @@ |
package org.chromium.chrome.browser.autofill; |
import android.content.Context; |
+import android.text.TextUtils; |
import android.view.LayoutInflater; |
import android.view.View; |
import android.view.ViewGroup; |
@@ -37,7 +38,13 @@ public class AutofillListAdapter extends ArrayAdapter<AutofillSuggestion> { |
TextView nameView = (TextView) layout.findViewById(R.id.autofill_name); |
nameView.setText(getItem(position).mName); |
TextView labelView = (TextView) layout.findViewById(R.id.autofill_label); |
- labelView.setText(getItem(position).mLabel); |
+ CharSequence label = getItem(position).mLabel; |
+ if (TextUtils.isEmpty(label)) { |
+ labelView.setVisibility(View.GONE); |
palmer
2013/06/06 21:16:42
Does this mean that if the |label| is empty, that
nyquist
2013/06/07 22:51:10
This code is just the generic autofill adapter for
|
+ } else { |
+ labelView.setText(label); |
+ labelView.setVisibility(View.VISIBLE); |
+ } |
return layout; |
} |