I would like to convert the whole scrolling layout inside a ScrollView to a Bitmap
<ScrollView...>
<RelativeLayout android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...>
</RelativeLayout>
</ScrollView>
If the content doesn't scroll, this code works great:
RelativeLayout content = (RelativeLayout) findViewById(R.id.content);
content.setDrawingCacheEnabled(true);
content.buildDrawingCache();
Bitmap bm = content.getDrawingCache();
but if the content is scrolling, getDrawingCache()
returns null.
Any suggestion on how I can export a scrolling view to a bitmap?