Mögliches Duplikat:
Die Methode getDrawingCache() von Android 2.1 View gibt immer null zurück
Ich habe ein Layout, das ich als Bitmap speichern möchte.
Wenn mein Layout kleiner ist als der Bildschirm, ist alles in Ordnung. Aber wenn mein Layout größer ist, ist die Bitmap (b) null.
Dies ist mein Code:
layout.setDrawingCacheEnabled(true);
int wt = layout.getMeasuredWidth();
int ht = layout.getMeasuredHeight();
layout.layout(0, 0, wt, ht);
Bitmap b = layout.getDrawingCache(true);
Wie kann ich also die gesamte Ansicht als Bitmap erhalten?