How to use Parcelable with Roboguice

51 views
Skip to first unread message

John

unread,
Dec 18, 2013, 2:46:31 PM12/18/13
to robo...@googlegroups.com
Hi,

I'm using some objects that I need to save during configuration change. If I have those objects extends Serializable, I can save them in a Bundle, but I've read that Parcelable is better than Serializable. Based on the doc (http://developer.android.com/reference/android/os/Parcelable.html), it looks like I need to use the operator new. Since I inject those objects, I was wondering how should I proceed?

thanks

Michael Burton

unread,
Dec 19, 2013, 1:26:16 AM12/19/13
to robo...@googlegroups.com

You can use RoboGuice.getInjector().injectMembers() to manually inject an object for cases where you have to manually instantiate things like this

--
You received this message because you are subscribed to the Google Groups "roboguice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to roboguice+...@googlegroups.com.
To post to this group, send email to robo...@googlegroups.com.
Visit this group at http://groups.google.com/group/roboguice.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages