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

Unified Diff: components/autofill/android/java/src/org/chromium/components/autofill/AutofillPopup.java

Issue 2665433002: [Merge M57] Use uniform margin for icon, label and sublabel (Closed)
Patch Set: 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
Index: components/autofill/android/java/src/org/chromium/components/autofill/AutofillPopup.java
diff --git a/components/autofill/android/java/src/org/chromium/components/autofill/AutofillPopup.java b/components/autofill/android/java/src/org/chromium/components/autofill/AutofillPopup.java
index 3a5bd066ed320f6931599a82835818eb984342f9..47f13dddf8f6785586aa71273c859938e1961e0b 100644
--- a/components/autofill/android/java/src/org/chromium/components/autofill/AutofillPopup.java
+++ b/components/autofill/android/java/src/org/chromium/components/autofill/AutofillPopup.java
@@ -67,10 +67,12 @@ public class AutofillPopup extends DropdownPopupWindow implements AdapterView.On
* suggestion label's type face is {@code Typeface.NORMAL}.
* @param dropdownItemHeight height of each dropdown item in dimension independent pixel units,
* 0 if unspecified.
+ * @param margin Margin for icon, label and between icon and label in dimension independent
+ * pixel units, 0 if not specified.
*/
@SuppressLint("InlinedApi")
public void filterAndShow(AutofillSuggestion[] suggestions, boolean isRtl,
- int backgroundColor, int dividerColor, int dropdownItemHeight) {
+ int backgroundColor, int dividerColor, int dropdownItemHeight, int margin) {
mSuggestions = new ArrayList<AutofillSuggestion>(Arrays.asList(suggestions));
// Remove the AutofillSuggestions with IDs that are not supported by Android
ArrayList<DropdownItem> cleanedData = new ArrayList<DropdownItem>();
@@ -87,7 +89,8 @@ public class AutofillPopup extends DropdownPopupWindow implements AdapterView.On
setAdapter(new DropdownAdapter(mContext, cleanedData, separators,
backgroundColor == Color.TRANSPARENT ? null : backgroundColor,
dividerColor == Color.TRANSPARENT ? null : dividerColor,
- dropdownItemHeight == 0 ? null : dropdownItemHeight));
+ dropdownItemHeight == 0 ? null : dropdownItemHeight,
+ margin == 0 ? null : margin));
setRtl(isRtl);
show();
getListView().setOnItemLongClickListener(this);
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_layout_model.cc ('k') | components/autofill/core/browser/autofill_experiments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698