Search in sources :

Example 1 with UriSerializer

use of fr.free.nrw.commons.utils.UriSerializer in project apps-android-commons by commons-app.

the class NearbyBaseMarker method writeToParcel.

@Override
public void writeToParcel(Parcel dest, int flags) {
    Gson gson = new GsonBuilder().registerTypeAdapter(Uri.class, new UriSerializer()).create();
    dest.writeParcelable(position, flags);
    dest.writeString(snippet);
    dest.writeString(icon.getId());
    dest.writeParcelable(icon.getBitmap(), flags);
    dest.writeString(title);
    dest.writeString(gson.toJson(place));
}
Also used : GsonBuilder(com.google.gson.GsonBuilder) Gson(com.google.gson.Gson) UriSerializer(fr.free.nrw.commons.utils.UriSerializer) Uri(android.net.Uri)

Aggregations

Uri (android.net.Uri)1 Gson (com.google.gson.Gson)1 GsonBuilder (com.google.gson.GsonBuilder)1 UriSerializer (fr.free.nrw.commons.utils.UriSerializer)1