summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/category/CategoryView.java
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-04-30 20:50:03 -0700
committernicolasroard <nicolasroard@google.com>2013-05-01 19:02:55 -0700
commit2ee98c8dc8bfba5e9820c14f348ee077c4a4236d (patch)
treee0b97aa3f0b4dceba8e63e3fa59bd28744690321 /src/com/android/gallery3d/filtershow/category/CategoryView.java
parente6a85fb5dc3148d8ef4d6cda30183a9ee33f7314 (diff)
downloadandroid_packages_apps_Snap-2ee98c8dc8bfba5e9820c14f348ee077c4a4236d.tar.gz
android_packages_apps_Snap-2ee98c8dc8bfba5e9820c14f348ee077c4a4236d.tar.bz2
android_packages_apps_Snap-2ee98c8dc8bfba5e9820c14f348ee077c4a4236d.zip
Fix UI
bug:8664728 Change-Id: I90b903e8935b2b6c0dbd6590cff36865644c49b4
Diffstat (limited to 'src/com/android/gallery3d/filtershow/category/CategoryView.java')
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryView.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryView.java b/src/com/android/gallery3d/filtershow/category/CategoryView.java
index 5467841c4..c101f983f 100644
--- a/src/com/android/gallery3d/filtershow/category/CategoryView.java
+++ b/src/com/android/gallery3d/filtershow/category/CategoryView.java
@@ -62,11 +62,8 @@ public class CategoryView extends View implements View.OnClickListener {
return;
}
text = text.toUpperCase();
- mPaint.reset();
- mPaint.setColor(mTextColor);
mPaint.setTextSize(sTextSize);
mPaint.setTypeface(Typeface.DEFAULT_BOLD);
- mPaint.setAntiAlias(true);
float textWidth = mPaint.measureText(text);
mPaint.getTextBounds(text, 0, text.length(), mTextBounds);
int x = (int) (canvas.getWidth() - textWidth - sMargin);
@@ -77,13 +74,22 @@ public class CategoryView extends View implements View.OnClickListener {
public void onDraw(Canvas canvas) {
canvas.drawColor(mBackgroundColor);
if (mAction != null) {
- drawText(canvas, mAction.getName());
+ mPaint.reset();
+ mPaint.setAntiAlias(true);
if (mAction.getImage() == null) {
mAction.setImageFrame(new Rect(0, 0, canvas.getWidth(), canvas.getHeight()));
} else {
Bitmap bitmap = mAction.getImage();
canvas.drawBitmap(bitmap, 0, 0, mPaint);
}
+ mPaint.setColor(mBackgroundColor);
+ mPaint.setStyle(Paint.Style.STROKE);
+ mPaint.setStrokeWidth(3);
+ drawText(canvas, mAction.getName());
+ mPaint.setColor(mTextColor);
+ mPaint.setStyle(Paint.Style.FILL);
+ mPaint.setStrokeWidth(1);
+ drawText(canvas, mAction.getName());
}
}