サーフェス ビューに問題があります。実際、サーフェス ビューでオブジェクトを描画すると、描画中 (onMoving) には表示されませんが、サーフェス ビューから指を離すと、描画オブジェクトが表示されます。だから誰でもそれを解決してください。
私のコードは.......
public boolean onTouch(View view, MotionEvent motionEvent) {
if(motionEvent.getAction() == MotionEvent.ACTION_DOWN){
currentDrawingPath = new DrawingPath();
currentDrawingPath.paint = currentPaint;
currentDrawingPath.path = new Path();
currentBrush.mouseDown(currentDrawingPath.path, motionEvent.getX(), motionEvent.getY());
}else if(motionEvent.getAction() == MotionEvent.ACTION_MOVE){
currentBrush.mouseMove( currentDrawingPath.path, motionEvent.getX(), motionEvent.getY() );
}else if(motionEvent.getAction() == MotionEvent.ACTION_UP){
currentBrush.mouseUp( currentDrawingPath.path, motionEvent.getX(), motionEvent.getY() );
drawingSurface.addDrawingPath(currentDrawingPath);
}
return true;
}