相关疑难解决方法(0)

Android View.getDrawingCache返回null,仅返回null

有人请尝试向我解释原因

public void addView(View child) {
  child.setDrawingCacheEnabled(true);
  child.setWillNotCacheDrawing(false);
  child.setWillNotDraw(false);
  child.buildDrawingCache();
  if(child.getDrawingCache() == null) { //TODO Make this work!
    Log.w("View", "View child's drawing cache is null");
  }
  setImageBitmap(child.getDrawingCache()); //TODO MAKE THIS WORK!!!
}
Run Code Online (Sandbox Code Playgroud)

ALWAYS记录绘图缓存为空,并将位图设置为null?

在设置缓存之前,我是否必须实际绘制视图?

谢谢!

android android-view

94
推荐指数
3
解决办法
7万
查看次数

从android中的imageView保存图像

我在图像视图中有一个图像,我想将图像从图像视图保存到图库或任何存储空间任何人都可以告诉我如何做到这一点?谢谢.

最好的祝福

eclipse android image

1
推荐指数
1
解决办法
3769
查看次数

标签 统计

android ×2

android-view ×1

eclipse ×1

image ×1