Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b439221a authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "QuickContactBadge shows its pressed state" into honeycomb

parents 21f62b9e 5cba8626
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -112,6 +112,16 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
        mBadgeBackground = getBackground();
    }

    @Override
    protected void drawableStateChanged() {
        super.drawableStateChanged();
        Drawable d = mOverlay;
        if (d != null && d.isStateful()) {
            d.setState(getDrawableState());
            invalidate();
        }
    }

    private void init() {
        mQueryHandler = new QueryHandler(mContext.getContentResolver());
        setOnClickListener(this);
@@ -130,7 +140,8 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

        if (mOverlay == null || mOverlay.getIntrinsicWidth() == 0 || mOverlay.getIntrinsicHeight() == 0) {
        if (mOverlay == null || mOverlay.getIntrinsicWidth() == 0 ||
                mOverlay.getIntrinsicHeight() == 0) {
            return; // nothing to draw
        }