自定义键盘中的手势输入滑动动画绘制视图

时间:2018-10-16 05:22:15

标签: android animation custom-keyboard typing

我正在开发一个自定义键盘应用程序,并希望在其上实现手势键入功能。我已经用简单的绘画绘制完成了手势键入,但是我想做类似Google Keyboard手势动画的动画。我该怎么做?

Here is a animation demo image of Gboard

我的绘画代码:

 drawPaint = new Paint();
        drawPaint.setAntiAlias(true);
        drawPaint.setDither(true);
        drawPaint.setColor(keydatastore.getgesturecolor());
        drawPaint.setStrokeWidth(10f);
        drawPaint.setStyle(Paint.Style.STROKE);
        drawPaint.setStrokeJoin(Paint.Join.ROUND);
        drawPaint.setStrokeCap(Paint.Cap.ROUND);

在键盘视图类中,我将其绘制为:

canvas.drawPath(KeyboardService.path,KeyboardService.drawPaint);

0 个答案:

没有答案