Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Parcelables #11

Open
LouisCAD opened this issue Oct 25, 2016 · 0 comments
Open

Support Parcelables #11

LouisCAD opened this issue Oct 25, 2016 · 0 comments

Comments

@LouisCAD
Copy link

Hi,
I wanted to include LatLng, a parcelable class from the Google Maps API, and the plugin generated wrong code for this field, inventing a method name based on the class name.
To solve the problem, I added these two extension functions in the companion object:

private fun Parcel.readLatLng(): LatLng? = LatLng.CREATOR.createFromParcel(this)
private fun Parcel.writeLatLng(position: LatLng?) = position?.writeToParcel(this, 0)

so I could use them in place of the wrong code.
Could this plugin support Parcelables along with primitives types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant