How To Pass An Object Containing With Drawable Parameter To Another Activity Through Intent Using Parcelable Interface In Android
I want to pass an object containing a drawable field using Parcelable Inteface to another Activity. But problem is, in public void writeToParcel(Parcel parcel, int flags) overridd
Solution 1:
Convert your Drawable to Bitmap and send it to Another Activity.
Bitmapbitmap= ((BitmapDrawable)d).getBitmap();
intent.putExtra("Bitmap", bitmap);
To Fetch, that intent
Bitmapbitmap= (Bitmap)this.getIntent().getParcelableExtra("Bitmap");
For More detail Follow this Link
Post a Comment for "How To Pass An Object Containing With Drawable Parameter To Another Activity Through Intent Using Parcelable Interface In Android"