ImageView iv = (ImageView) findViewById(R.id.ImageView01);ImageView iv2 = (ImageView) findViewById(R.id.ImageView02);ImageView iv3 = (ImageView) findViewById(R.id.ImageView03); //draw的方式对整屏截取,但信息栏为黑色View cv = getWindow().getDecorView();  Bitmap b = Bitmap.createBitmap(200, 200, Bitmap.Config.RGB_565);  cv.draw(new Canvas(b));iv.setImageBitmap(b); //对隐藏的未画过的对象,截出的是黑色Bitmap image = Bitmap.createBitmap(200, 200, Bitmap.Config.RGB_565);bt3.draw(new Canvas(image));iv2.setImageBitmap(image); //get drawable cache , bitmap to drawablebt4.setDrawingCacheEnabled(true);Bitmap bitmap = bt4.getDrawingCache();Drawable drawable = (Drawable) new BitmapDrawable(bitmap);iv3.setBackgroundDrawable(drawable);

更多相关文章

  1. android Sqlite数据库对象模型ORMLite框架学习
  2. 【Android】Aidl使用详解(支持多个回调和传递自定义对象)
  3. Android 通过 Intent 传递类对象
  4. Intent传递对象的两种方法(Serializable,Parcelable)
  5. Android系列之Intent传递对象的两种方法
  6. Android studio插件GsonFormat,返回json快速创建实体对象

随机推荐

  1. androidj常用数据库操作JDBC Utils
  2. The ultimate Android(安卓)tethering gu
  3. Android应用开机自启
  4. intent-filter
  5. android 下的内存状态获取
  6. 安卓如何关闭软键盘?
  7. cts android.hardware.camera2.cts.Recor
  8. Android----imageView实现图片的旋转和缩
  9. Android之背景圆角矩形
  10. radioButton 使用