PinView icon indicating copy to clipboard operation
PinView copied to clipboard

Enable custom filled background

Open nguyendat opened this issue 5 years ago • 1 comments

Feature request: allow to change background of filled item

nguyendat avatar Feb 05 '20 10:02 nguyendat

This is my solution to this: change the method drawCircle(Canvas canvas, int i) like this:

private void drawCircle(Canvas canvas, int i) {
        Paint paint = getPaintByIndex(i);
        float cx = mItemCenterPoint.x;
        float cy = mItemCenterPoint.y;

        if (getText().toString().trim().length() > 0) {
            paint.setColor(ContextCompat.getColor(getContext(), R.color.filled_color));
        } else {
            paint.setColor(ContextCompat.getColor(getContext(), R.color.empty_color));
        }

        canvas.drawPath(mPath, paint);

        paint.setColor(ContextCompat.getColor(getContext(), R.color.circle_color));
        canvas.drawCircle(cx, cy, paint.getTextSize() / 2, paint);
    }

maher640 avatar Feb 04 '22 21:02 maher640