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

Side by Side Diff: ui/android/java/src/org/chromium/ui/autofill/AutofillDividerDrawable.java

Issue 23314003: Add support for datalist to text input element on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
Miguel Garcia 2013/11/06 17:33:56 nit: extra blank line
keishi 2013/11/07 04:19:18 Done.
6 package org.chromium.ui.autofill;
7
8 import android.graphics.Canvas;
9 import android.graphics.ColorFilter;
10 import android.graphics.Paint;
11 import android.graphics.Rect;
12 import android.graphics.RectF;
13 import android.graphics.drawable.Drawable;
14
15 public class AutofillDividerDrawable extends Drawable {
16
17 private Paint mPaint;
18 private RectF mDividerRect;
newt (away) 2013/10/03 16:34:51 mDividerRect always has integer coordinates, so I'
keishi 2013/10/04 05:52:28 Done.
19
20 public AutofillDividerDrawable() {
21 mPaint = new Paint();
22 mDividerRect = new RectF();
23 }
24
25 @Override
26 public void draw(Canvas canvas) {
27 canvas.drawRect(mDividerRect, mPaint);
28 }
29
30 @Override
31 public void onBoundsChange(Rect bounds) {
32 mDividerRect.set(0, 0, bounds.width(), mDividerRect.height());
33 }
34
35 public void setHeight(int height) {
36 mDividerRect.set(0, 0, mDividerRect.right, (float) height);
37 }
38
39 public void setColor(int color) {
40 mPaint.setColor(color);
41 }
42
43 @Override
44 public void setAlpha(int alpha) {
45 }
46
47 @Override
48 public void setColorFilter(ColorFilter cf) {
49 }
50
51 @Override
52 public int getOpacity() {
53 return 255;
Miguel Garcia 2013/11/06 17:33:56 can you add comment or perhaps use a constant for
keishi 2013/11/07 04:19:18 I found a constant already defined android.graphic
54 }
55
Miguel Garcia 2013/11/06 17:33:56 nit: extra line
keishi 2013/11/07 04:19:18 Done.
56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698