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() );

}

}

}

2011/12/06 11:33 2011/12/06 11:33

Trackback Address :: 이 글에는 트랙백을 보낼 수 없습니다