How to clear finger paint?

后端 未结 1 1194
后悔当初
后悔当初 2021-01-16 05:06

I am new to android,i prepared one painting view using finger with help of FingerPaint.java in Api Demo.It is working fine.

The same view contains one button(clear),

相关标签:
1条回答
  • 2021-01-16 05:30

    make a public function in your custom drawing class named as clearDrawing(); and write this:

    mBitmap = null;
    mPath = null;
    mBitmap = Bitmap.createBitmap(480, 480, Bitmap.Config.ARGB_8888);
    mPath = new Path();
    

    now call clearDrawing() to reset drawing control.

    0 讨论(0)
提交回复
热议问题