How to get the drawable from relative layout in android
What i have done: I have set the bitmap for a relative layout as below RelativeLayout root; root= (RelativeLayout) itemView.findViewById(R.id.root); BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 4; Bitmap preview_bitmap = BitmapFactory.decodeResource(context.getResources(),godImages[position], options); Drawable drawable = new BitmapDrawable(context.getResources(),preview_bitmap); root.setBackgroundDrawable(drawable); What i am trying to do: I am trying to get the bitmap from the relativelayout back again that was set so that i can pass to another activity