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

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

Issue 2791363002: A drop-down should take a line to be always aligned with text-fields. (Closed)
Patch Set: Small Mistake Created 3 years, 9 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 | « 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/EditorView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java
index 3c9164b5c934e56954b04ee05f45ea0c91f72a9f..ee52870ee7e38736633e8135beab70a747370747 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorView.java
@@ -321,14 +321,19 @@ public class EditorView extends AlwaysDismissedDialog implements OnClickListener
EditorFieldModel nextFieldModel = null;
boolean isLastField = i == mEditorModel.getFields().size() - 1;
- boolean useFullLine = fieldModel.isFullLine();
- if (!isLastField && !useFullLine) {
+ // Dropdown fields will take a full line
+ boolean useFullLine = fieldModel.isFullLine() || isLastField
+ || (fieldModel.getInputTypeHint() == EditorFieldModel.INPUT_TYPE_HINT_DROPDOWN);
+
+ if (!useFullLine) {
// If the next field isn't full, stretch it out.
nextFieldModel = mEditorModel.getFields().get(i + 1);
- if (nextFieldModel.isFullLine()) useFullLine = true;
+ useFullLine = useFullLine || nextFieldModel.isFullLine()
+ || (nextFieldModel.getInputTypeHint()
+ == EditorFieldModel.INPUT_TYPE_HINT_DROPDOWN);
}
- if (useFullLine || isLastField) {
+ if (useFullLine) {
addFieldViewToEditor(mDataView, fieldModel);
} else {
// Create a LinearLayout to put it and the next view side by side.
« 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