1

Create bitmap from view makes view disappear

view story
linux-howto

http://stackoverflow.com – I found two ways of creating a Bitmap from a view. But once I do that, the view disappears and I can't use it anymore. How can I redraw the view after generating my bitmap? 1st: public static Bitmap getBitmapFromView(View view) { Bitmap returnedBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(),Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(returnedBitmap); Drawable bgDrawable =view.getBackground(); if (bgDrawable!=null) bgDrawable.draw(canvas); else canvas.drawColor(Color.WHITE); view.draw(canvas); return returnedBitmap; } 2nd: Bitmap viewCapture = null; the (HowTos)