I\'m working with Android 2.1 and have the following problem: Using the method View.getDrawingCache() always returns null. getDrawingCache() should return a Bitmap, which is
had the same problem and finally this partly works for me:
view.layout(0, 0, 1000, 100);
Bitmap b = view.getDrawingCache();
try {
b.compress(CompressFormat.JPEG, 95,
new FileOutputStream( Environment.getExternalStorageDirectory() + "/folder/name.jpg"));
catch (FileNotFoundException e) {
Log.e(LOGTAG, "error:" + e.getMessage());
}
the only problem is, that I can't get the full dimensions of my view. view.getwidth returns null ...