Call to `getDrawingCache` returns null when scroll is enabled

I solved it. Created a bitmap of view size and drew the view into it.

TableLayout page = (TableLayout) findViewById(R.id.page);
Bitmap pageBmp = Bitmap.createBitmap(page.getWidth(), page.getHeight(), 
                                       Config.ARGB_8888);
Canvas canvas = new Canvas(pageBmp);
page.draw(canvas);

Used the pageBmp bitmap..

Leave a Comment