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

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

Issue 2874933008: Adds animation as feature variation to keyboard accessory. (Closed)
Patch Set: Postpone RTL animation with TODO until we understand expected behavior. Created 3 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/AutofillKeyboardAccessoryBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
index b339c1a1388c9a46d0106ef60d662e9c8e74c328..a4a65da44013bf88b293c78e70f289a20fa54acb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
@@ -71,9 +71,14 @@ public class AutofillKeyboardAccessoryBridge
* This function should be called at most one time.
* @param nativeAutofillKeyboardAccessory Handle to the native counterpart.
* @param windowAndroid The window on which to show the suggestions.
+ * @param animationDurationMillis If 0, do not animate. Otherwise, animation duration.
+ * @param shouldLimitLabelWidth If true, limit suggestion label width to 1/2 device's width.
+ * If {@param animationDurationMillis} > 0, we reverse animation to scroll the first
Ted C 2017/05/17 00:04:29 style nit If this is a continuation of shouldLimi
csashi 2017/05/17 01:14:15 Done.
+ * suggestion out of the viewport at the end of the reversed animation.
*/
@CalledByNative
- private void init(long nativeAutofillKeyboardAccessory, WindowAndroid windowAndroid) {
+ private void init(long nativeAutofillKeyboardAccessory, WindowAndroid windowAndroid,
+ int animationDurationMillis, boolean shouldLimitLabelWidth) {
if (windowAndroid == null || windowAndroid.getActivity().get() == null) {
nativeViewDismissed(nativeAutofillKeyboardAccessory);
dismissed();
@@ -81,7 +86,8 @@ public class AutofillKeyboardAccessoryBridge
}
mNativeAutofillKeyboardAccessory = nativeAutofillKeyboardAccessory;
- mAccessoryView = new AutofillKeyboardAccessory(windowAndroid, this);
+ mAccessoryView = new AutofillKeyboardAccessory(
+ windowAndroid, this, animationDurationMillis, shouldLimitLabelWidth);
mContext = windowAndroid.getActivity().get();
}

Powered by Google App Engine
This is Rietveld 408576698