本文实例为大家分享了Android仿QQ聊天消息气泡拖拽效果展示的具体代码,供大家参考,具体内容如下
成都创新互联公司主要从事网站制作、成都网站设计、网页设计、企业做网站、公司建网站等业务。立足成都服务东城,十多年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:13518219792先画圆,都会吧。代码如下:
public class Bezier extends View { private final Paint mGesturePaint = new Paint(); private final Path mPath = new Path(); private float mX1 = 100, mY1 = 150; private float mX2 = 300, mY2 = 150; private boolean mBezier = true; private int mRadius = 30; public Bezier(Context context, AttributeSet attrs) { super(context, attrs); mGesturePaint.setAntiAlias(true); mGesturePaint.setStyle(Paint.Style.FILL_AND_STROKE); mGesturePaint.setStrokeWidth(5); mGesturePaint.setColor(Color.RED); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); canvas.drawCircle(mX1, mX2, mRadius, mGesturePaint); } }