private void saveView( View view )
{
String path =
Environment.getExternalStorageDirectory().getAbsolutePath();
Bitmap b = Bitmap.createBitmap(
view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);
if(b!=null){
try {
File f = new File(path+"/notes");
f.mkdir();
File f2 = new File(path + "/notes/"+title+".png");
Canvas c = new Canvas( b );
view.draw( c );
FileOutputStream fos = new FileOutputStream(f2);
if ( fos != null )
{
b.compress(Bitmap.CompressFormat.PNG, 100, fos );
fos.close();
}
//setWallpaper( b );
} catch( Exception e ){
Log.e("testSaveView", "Exception: " + e.toString() );
}
}
}