Last active
August 29, 2019 09:46
Revisions
-
cmelchior revised this gist
Jul 27, 2015 . 3 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes. -
cmelchior renamed this gist
Jul 27, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
cmelchior renamed this gist
Jul 27, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
cmelchior renamed this gist
Jul 27, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
cmelchior created this gist
Jul 27, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ @Parcel(implementations = { BarRealmProxy.class }, value = Parcel.Serialization.BEAN, analyze = { Bar.class }) public class Bar extends RealmObject { private String baz; public void setBaz(String baz) { this.baz = baz; } public String getBaz() { return baz; } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // Specific class for a RealmList<Bar> field public class BarListParcelConverter extends RealmListParcelConverter<Bar> { @Override public void itemToParcel(Bar input, Parcel parcel) { parcel.writeParcelable(Parcels.wrap(input), 0); } @Override public Bar itemFromParcel(Parcel parcel) { return Parcels.unwrap(parcel.readParcelable(Bar.class.getClassLoader())); } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ @Parcel(implementations = { FooRealmProxy.class }, value = Parcel.Serialization.BEAN, analyze = { Foo.class }) public class Foo extends RealmObject { private RealmList<Bar> bars; @ParcelPropertyConverter(BarListParcelConverter.class) public void setBars(RealmList<Bar> bars) { this.bars = bars; } public RealmList<Bar> getBars() { return bars; } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ // Abstract class for working with RealmLists public abstract class RealmListParcelConverter<T extends RealmObject> extends CollectionParcelConverter<T, RealmList<T>> { @Override public RealmList<T> createCollection() { return new RealmList<T>(); } }