diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/wallpaper/livepicker/BubbleTextView.java | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/com/android/wallpaper/livepicker/BubbleTextView.java b/src/com/android/wallpaper/livepicker/BubbleTextView.java index 3ac5605..5b1bf80 100644 --- a/src/com/android/wallpaper/livepicker/BubbleTextView.java +++ b/src/com/android/wallpaper/livepicker/BubbleTextView.java @@ -37,7 +37,6 @@ public class BubbleTextView extends TextView { private Paint mPaint; private boolean mBackgroundSizeChanged; - private Drawable mBackground; private float mCornerRadius; private float mPaddingH; private float mPaddingV; @@ -58,7 +57,6 @@ public class BubbleTextView extends TextView { } private void init() { - mBackground = getBackground(); setBackgroundDrawable(null); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); @@ -80,40 +78,7 @@ public class BubbleTextView extends TextView { } @Override - protected boolean verifyDrawable(Drawable who) { - return who == mBackground || super.verifyDrawable(who); - } - - @Override - protected void drawableStateChanged() { - Drawable d = mBackground; - if (d != null && d.isStateful()) { - d.setState(getDrawableState()); - } - super.drawableStateChanged(); - } - - @Override public void draw(Canvas canvas) { - final Drawable background = mBackground; - if (background != null) { - final int scrollX = mScrollX; - final int scrollY = mScrollY; - - if (mBackgroundSizeChanged) { - background.setBounds(0, 0, mRight - mLeft, mBottom - mTop); - mBackgroundSizeChanged = false; - } - - if ((scrollX | scrollY) == 0) { - background.draw(canvas); - } else { - canvas.translate(scrollX, scrollY); - background.draw(canvas); - canvas.translate(-scrollX, -scrollY); - } - } - final Layout layout = getLayout(); final RectF rect = mRect; final int left = getCompoundPaddingLeft(); @@ -127,16 +92,4 @@ public class BubbleTextView extends TextView { super.draw(canvas); } - - @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); - mBackground.setCallback(this); - } - - @Override - protected void onDetachedFromWindow() { - super.onDetachedFromWindow(); - mBackground.setCallback(null); - } } |