本文实例为大家分享了TextView绘制背景的方法,供大家参考,具体内容如下
效果:
实现流程:
1.初始化:对画笔进行设置
mPaintIn = new Paint();
mPaintIn.setAntiAlias(true);
mPaintIn.setDither(true);
mPaintIn.setStyle(Paint.Style.FILL);
mPaintIn.setColor(getResources().getColor(R.color.colorPrimary));
mPaintOut = new Paint();
mPaintOut.setAntiAlias(