I created a class, which has several member variables, all of which are serializable... except one Bitmap! I tried to extend bitmap and implement serializable, not thinking
I had the same problem.
And i decided like this.
Bitmap
is Parcelable
, so I made following to my class.
I made Constructor which gets Bundle
object , and getter that
returns Bundle representing Objects data. So while Bitmap is
parcelable , Bundle can save bitmap as parcelable in it.
When you need to pass Date in intent , you can call objects
getBundle()
method and pass with Intent.putExtra(String key,Bundle value)
In target activity you will call getBundle(String key)
and pass it
to constructor.
I think it's very easy approach.