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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java

Issue 14886012: Implement layout transition animations for the Autofill dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed rotation logic, wasn't calling super. Created 7 years, 7 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
Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
index 7c307471c918b585d15b6bc50b412d7dbeab294b..426551a256d2f6abc8d4d68e282a22bf43e67536 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
@@ -24,8 +24,7 @@ public class AutofillDialogUtils {
}
/**
- * Returns the {@link Spinner} ID for the given section in the AutofillDialog
- * layout
+ * Returns the {@link Spinner} ID for the given section in the AutofillDialog layout.
* @param section The section to return the spinner ID for.
* @return The Android ID for the spinner dropdown for the given section.
*/
@@ -48,6 +47,29 @@ public class AutofillDialogUtils {
}
/**
+ * Returns the autofill menu item layout ID for the given section in the AutofillDialog layout.
+ * @param section The section to return the item layout ID for.
+ * @return The Android ID for the autofill menu item layout for the given section.
+ */
+ public static int getItemLayoutIDForSection(int section) {
+ switch (section) {
+ case AutofillDialogConstants.SECTION_CC :
+ return R.layout.autofill_menu_item;
+ case AutofillDialogConstants.SECTION_CC_BILLING :
+ return R.layout.autofill_menu_item;
+ case AutofillDialogConstants.SECTION_SHIPPING :
+ return R.layout.autofill_simple_menu_item;
+ case AutofillDialogConstants.SECTION_BILLING :
+ return R.layout.autofill_simple_menu_item;
+ case AutofillDialogConstants.SECTION_EMAIL :
+ return R.layout.autofill_simple_menu_item;
+ default:
+ assert(false);
+ return INVALID_ID;
+ }
+ }
+
+ /**
* Returns the section that has a spinner with the given id.
* @param id The Android ID to look up.
* @return The section with a spinner with the given ID.

Powered by Google App Engine
This is Rietveld 408576698