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

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

Issue 2592733002: [Payments] Update billing address dropdown style to match the design (Closed)
Patch Set: pad at the end of the selected item view to avoid overlapping dropdown icon Created 3 years, 11 months 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 | « chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java ('k') | 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/EditorDropdownField.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java
index fcbed1fb0d60afa8447c07ea37e6e55234370963..52a78e5d87fb1753e12c189104fcfaff4716561f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java
@@ -59,9 +59,15 @@ class EditorDropdownField implements EditorFieldView {
ArrayAdapter<DropdownKeyValue> adapter;
if (mFieldModel.getHint() != null) {
// Use the BillingAddressAdapter and pass it a hint to be displayed as default.
- adapter = new BillingAddressAdapter<DropdownKeyValue>(
- context, R.layout.multiline_spinner_item, dropdownKeyValues,
+ adapter = new BillingAddressAdapter<DropdownKeyValue>(context,
+ R.layout.multiline_spinner_item, R.id.spinner_item, dropdownKeyValues,
new DropdownKeyValue("", mFieldModel.getHint().toString()));
+ // Wrap the TextView in the dropdown popup around with a FrameLayout to display the text
+ // in multiple lines.
+ // Note that the TextView in the dropdown popup is displayed in a DropDownListView for
+ // the dropdown style Spinner and the DropDownListView sets to display TextView instance
+ // in a single line.
+ adapter.setDropDownViewResource(R.layout.payment_request_dropdown_item);
// If no value is selected, select the hint entry which is the last item in the adapter.
// Using getCount will not result in an out of bounds index because the hint value is
@@ -70,8 +76,8 @@ class EditorDropdownField implements EditorFieldView {
} else {
adapter = new ArrayAdapter<DropdownKeyValue>(
context, R.layout.multiline_spinner_item, dropdownKeyValues);
+ adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
}
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mDropdown = (Spinner) mLayout.findViewById(R.id.spinner);
mDropdown.setTag(this);
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/ui/BillingAddressAdapter.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698