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

Suggestion for API change to remove more boilerplate #11

Open
mg6maciej opened this issue Apr 28, 2015 · 1 comment
Open

Suggestion for API change to remove more boilerplate #11

mg6maciej opened this issue Apr 28, 2015 · 1 comment
Milestone

Comments

@mg6maciej
Copy link
Contributor

I like that you don't have a subclass like in Parceler and other similar libraries.

How about changing the code you have to write to something like code below?

@ParcelablePlease
public class Model implements Parcelable {

  int id;
  String name;
  OtherModel otherModel;

  @Override public int describeContents() {
    return 0;
  }

  @Override public void writeToParcel(Parcel dest, int flags) {
    ModelParcelablePlease.writeToParcel(this, dest, flags);
  }

  public static final Creator<Model> CREATOR = ModelParcelablePlease.creator();
}
@sockeqwe
Copy link
Owner

good idea!

@sockeqwe sockeqwe added this to the next milestone Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants