1public static Bitmap loadBitmapFromView(View v) {
2 Bitmap b = Bitmap.createBitmap( v.getLayoutParams().width, v.getLayoutParams().height, Bitmap.Config.ARGB_8888);
3 Canvas c = new Canvas(b);
4 v.layout(v.getLeft(), v.getTop(), v.getRight(), v.getBottom());
5 v.draw(c);
6 return b;
7}