I am playing with gestures in android. I want to save gestures as images. I have found that there is a toBitmap method to convert gesture to image, but i can not get it working. Here is my code. I get an error on signature.toBitmap() line that toBitmap method is undefined for GestureOverlayView. Can i convert GestureOverlayView to Gesture or is there any other way??
final Button convert = (Button) findViewById(R.id.convert);
convert.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
GestureOverlayView signature = (GestureOverlayView) findViewById(R.id.signature);
signature.toBitmap();
signature.clear(isChild());
}
});
Have you tried to store the gesture and call the toBitmap() method on that rather than trying to store a bitmap off the GestureOverlayView directly?
This can be seen in the gesture builder sample application found in the android toolkit samples.
GestureBuilderActivity.java:353