I have a problem with the next class:
public class MyView extends SurfaceView implements Runnable {
public void run() {
Canvas c = holder.lockCanvas();
c.drawARGB( 255, 0, 255, 80 );
for ( short i = 0; i < bitmapsArr.size(); i++ ) {
c.drawBitmap( bitmap.get( i ), 100, 50, null );
}
holder.unlockCanvasAndPost( c );
}
public void saveCanvasToFile( String filename ){
// ???
}
}
I draw on canvas which places on another thread. I wanna save this canvas to file but I don't know how to do it. I've tried to use the DrawingCache system - but it doesn't work cause my drawings on other thread... Doest anybody know what to do in this case?