Solution 1:
Convert your Drawable to Bitmap and send it to Another Activity.
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
To send,
intent.putExtra("Bitmap", bitmap);
To Fetch,
Bitmap bitmap = (Bitmap)this.getIntent().getParcelableExtra("Bitmap");
Solution 2: (for drawable
easy & light way)
Send the resource integer value like:
MAIN ACTIVITY
Intent intent = new Intent(this, SecondActivity.class);
intent.putExtra("resourseInt", R.drawable.image);
startActivity(intent);
SECOND ACTIVITY
@Override
public void onCreate(Bundle bundle)
{
super.onCreate(bundle);
setContentView(R.layout.yot_layout);
Bundle extras = getIntent().getExtras();
if (extras == null) {
return;
}
int res = extras.getInt("resourseInt");
ImageView view = (ImageView) findViewById(R.id.something);
view.setImageResourse(res);
}