标签:android style color io os ar java for sp
============问题描述============
setBackgroundDrawable(new BitmapDrawable(BitmapFactory.decodeFile("/storage/sdcard/bg.jpg")));
myCanvas.save(Canvas.ALL_SAVE_FLAG);
myCanvas.restore();
File f = new File("/storage/sdcard/","bg.jpg");
if(f.exists()){
f.delete();
}
FileOutputStream fos = null;
try {
fos = new FileOutputStream(f);
myBitmap.compress(Bitmap.CompressFormat.JPEG, 90, fos);
try {
fos.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
fos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
============解决方案1============
标签:android style color io os ar java for sp
原文地址:http://www.cnblogs.com/hugangyan86/p/4042033.html