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

Unified Diff: ui/android/java/src/org/chromium/ui/DropdownDividerDrawable.java

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Fix merge Created 4 years 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: ui/android/java/src/org/chromium/ui/DropdownDividerDrawable.java
diff --git a/ui/android/java/src/org/chromium/ui/DropdownDividerDrawable.java b/ui/android/java/src/org/chromium/ui/DropdownDividerDrawable.java
index 014192a55761ddf6912c2fca3641c807671bbfde..16d6b9b11303ce02e994d9cb7d2c7c3bff25bc79 100644
--- a/ui/android/java/src/org/chromium/ui/DropdownDividerDrawable.java
+++ b/ui/android/java/src/org/chromium/ui/DropdownDividerDrawable.java
@@ -15,14 +15,18 @@ class DropdownDividerDrawable extends Drawable {
private Paint mPaint;
private Rect mDividerRect;
+ // Paints canvas with |mBackgroundColor|, if |mBackgroundColor| is not 0.
Theresa 2016/12/08 18:26:20 This should go as a JavaDoc on the constructor.
+ private int mBackgroundColor;
- public DropdownDividerDrawable() {
+ public DropdownDividerDrawable(int backgroundColor) {
mPaint = new Paint();
mDividerRect = new Rect();
+ mBackgroundColor = backgroundColor;
}
@Override
public void draw(Canvas canvas) {
+ if (mBackgroundColor != 0) canvas.drawColor(mBackgroundColor);
canvas.drawRect(mDividerRect, mPaint);
}
@@ -35,7 +39,7 @@ class DropdownDividerDrawable extends Drawable {
mDividerRect.set(0, 0, mDividerRect.right, height);
}
- public void setColor(int color) {
+ public void setDividerColor(int color) {
mPaint.setColor(color);
}

Powered by Google App Engine
This is Rietveld 408576698