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

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: Created 7 years, 1 month 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 package org.chromium.ui.autofill;
6
7 import android.graphics.Canvas;
8 import android.graphics.ColorFilter;
9 import android.graphics.Paint;
10 import android.graphics.Rect;
11 import android.graphics.RectF;
12 import android.graphics.drawable.Drawable;
13 import android.graphics.PixelFormat;
14
15 public class AutofillDividerDrawable extends Drawable {
16
17 private Paint mPaint;
18 private Rect mDividerRect;
19
20 public AutofillDividerDrawable() {
21 mPaint = new Paint();
22 mDividerRect = new Rect();
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, 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 PixelFormat.OPAQUE;
54 }
55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698