Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java

Issue 2486673005: [Payments] Fixed billing address style bug. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java
index f14b2b967dd19d3f9bdb02b10d2b8d57625b25af..d7651749dc40752b32c56f982170029c087b53d5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java
@@ -70,10 +70,11 @@ public class BillingAddressAdapter<T> extends ArrayAdapter<T> {
@Override
public View getDropDownView(int position, View convertView, ViewGroup parent) {
- View view = super.getDropDownView(position, convertView, parent);
+ View view;
// Add a "+" icon and a blue tint to the last element.
if (position == getCount() - 1) {
+ view = super.getDropDownView(position, convertView, parent);
TextView tv = (TextView) view;
Resources resources = getContext().getResources();
@@ -90,6 +91,9 @@ public class BillingAddressAdapter<T> extends ArrayAdapter<T> {
tv.setTypeface(Typeface.create(
resources.getString(R.string.roboto_medium_typeface),
R.integer.roboto_medium_textstyle));
+ } else {
+ // Don't use the recycled convertView, as it may have the style of the last element.
+ view = super.getDropDownView(position, null, parent);
}
return view;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698