summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/ui
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2012-10-13 18:38:51 -0700
committernicolasroard <nicolasroard@google.com>2012-10-13 19:13:13 -0700
commit03cf9e04d820aff33a776a3b4b8744598f0cc365 (patch)
tree721cea06bc853a71ceb950debfd9af5eebe085df /src/com/android/gallery3d/filtershow/ui
parent1c44be4899c454e359cdde0b62f7678c59e0a8fa (diff)
downloadandroid_packages_apps_Snap-03cf9e04d820aff33a776a3b4b8744598f0cc365.tar.gz
android_packages_apps_Snap-03cf9e04d820aff33a776a3b4b8744598f0cc365.tar.bz2
android_packages_apps_Snap-03cf9e04d820aff33a776a3b4b8744598f0cc365.zip
Fix dimensions to use dips instead of pixels
bug:7343798 Change-Id: I3d576ae334e580ad9da5b56d4ae84f749004ec21
Diffstat (limited to 'src/com/android/gallery3d/filtershow/ui')
-rw-r--r--src/com/android/gallery3d/filtershow/ui/ImageButtonTitle.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/ui/ImageButtonTitle.java b/src/com/android/gallery3d/filtershow/ui/ImageButtonTitle.java
index 7f0b0437d..51ed7fb20 100644
--- a/src/com/android/gallery3d/filtershow/ui/ImageButtonTitle.java
+++ b/src/com/android/gallery3d/filtershow/ui/ImageButtonTitle.java
@@ -1,16 +1,15 @@
package com.android.gallery3d.filtershow.ui;
-import com.android.gallery3d.R;
-
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
-import android.util.Log;
import android.widget.ImageButton;
+import com.android.gallery3d.R;
+
public class ImageButtonTitle extends ImageButton {
private static final String LOGTAG = "ImageButtonTitle";
private String mText = null;
@@ -18,6 +17,14 @@ public class ImageButtonTitle extends ImageButton {
private static int mTextPadding = 20;
private static Paint gPaint = new Paint();
+ public static void setTextSize(int value) {
+ mTextSize = value;
+ }
+
+ public static void setTextPadding(int value) {
+ mTextPadding = value;
+ }
+
public ImageButtonTitle(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = getContext().obtainStyledAttributes(
@@ -26,6 +33,7 @@ public class ImageButtonTitle extends ImageButton {
mText = a.getString(R.styleable.ImageButtonTitle_android_text);
}
+ @Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (mText != null) {