标签:android style io color ar os java sp for
============问题描述============
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 io color ar os java sp for
原文地址:http://www.cnblogs.com/shaochuyun57/p/4091747.html