答案 0 :(得分:1)
我们可以将手势保存为位图
GestureOverlayView gestureView = (GestureOverlayView) findViewById(R.id.gestures);
gestureView.setDrawingCacheEnabled(true);
Bitmap bm = Bitmap.createBitmap(gestureView.getDrawingCache());
File f = new File(Environment.getExternalStorageDirectory()
+ File.separator + "signature.png");
f.createNewFile();
FileOutputStream os = new FileOutputStream(f);
os = new FileOutputStream(f);
//compress to specified format (PNG), quality - which is ignored for PNG, and out stream
bm.compress(Bitmap.CompressFormat.PNG, 100, os);
os.close();
答案 1 :(得分:0)
我计划做同样的事情,但还没有实施。我注意到有一个Guesture.toBitmap()方法,如果按照宣传的方式工作,它就像是票证。