Java Code Examples for android.os.Parcel#writeTypedList()

The following examples show how to use android.os.Parcel#writeTypedList() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: biermacht   File: MashProfile.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel p, int flags) {
  p.writeString(name);                // profile name
  p.writeInt(version);              // XML Version -- 1
  p.writeDouble(grainTemp);               // Grain temp in C
  p.writeTypedList(mashSteps);            // List of steps

  // Beer XML 1.0 Optional Fields ===================================
  // ================================================================
  p.writeDouble(tunTemp);        // TUN Temperature in C
  p.writeDouble(spargeTemp);      // Sparge Temp in C
  p.writeDouble(pH);              // pH of water
  p.writeDouble(tunWeight);       // Weight of TUN in kG
  p.writeDouble(tunSpecificHeat); // Specific heat of TUN
  p.writeString(notes);      // Notes
  p.writeInt(equipAdj ? 1 : 0);   // Adjust for heating of equip?

  // Custom Fields ==================================================
  // ================================================================
  p.writeLong(id);                  // id for use in database
  p.writeLong(ownerId);        // id for parent recipe
  p.writeString(mashType);
  p.writeString(spargeType);
  // Don't write recipe because it recurses.
}
 
Example 2
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.id);
    dest.writeString(this.created_at);
    dest.writeInt(this.width);
    dest.writeInt(this.height);
    dest.writeString(this.color);
    dest.writeInt(this.views);
    dest.writeInt(this.downloads);
    dest.writeInt(this.likes);
    dest.writeByte(this.liked_by_user ? (byte) 1 : (byte) 0);
    dest.writeString(this.description);
    dest.writeParcelable(this.exif, flags);
    dest.writeParcelable(this.location, flags);
    dest.writeParcelable(this.urls, flags);
    dest.writeParcelable(this.links, flags);
    dest.writeParcelable(this.story, flags);
    dest.writeParcelable(this.stats, flags);
    dest.writeParcelable(this.user, flags);
    dest.writeTypedList(this.current_user_collections);
    dest.writeTypedList(this.categories);
    dest.writeTypedList(this.tags);
    dest.writeParcelable(this.related_photos, flags);
    dest.writeParcelable(this.related_collections, flags);
}
 
Example 3
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(color);
    out.writeInt(dateTextAppearance);
    out.writeInt(weekDayTextAppearance);
    out.writeInt(showOtherDates);
    out.writeByte((byte) (allowClickDaysOutsideCurrentMonth ? 1 : 0));
    out.writeParcelable(minDate, 0);
    out.writeParcelable(maxDate, 0);
    out.writeTypedList(selectedDates);
    out.writeInt(firstDayOfWeek);
    out.writeInt(orientation);
    out.writeInt(tileWidthPx);
    out.writeInt(tileHeightPx);
    out.writeInt(topbarVisible ? 1 : 0);
    out.writeInt(selectionMode);
    out.writeInt(dynamicHeightEnabled ? 1 : 0);
    out.writeInt(calendarMode == CalendarMode.WEEKS ? 1 : 0);
    out.writeParcelable(currentMonth, 0);
    out.writeByte((byte) (cacheCurrentPosition ? 1 : 0));
}
 
Example 4
Source Project: GithubApp   File: RepoDetail.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.baseRepo, flags);
    dest.writeParcelable(this.readme, flags);
    dest.writeTypedList(this.forks);
    dest.writeTypedList(this.contributors);
}
 
Example 5
Source Project: GithubApp   File: Content.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  super.writeToParcel(dest, flags);
  dest.writeInt(this.type == null ? -1 : this.type.ordinal());
  dest.writeInt(this.size);
  dest.writeString(this.name);
  dest.writeString(this.content);
  dest.writeString(this.path);
  dest.writeString(this.git_url);
  dest.writeParcelable(this._links, 0);
  dest.writeString(this.encoding);
  dest.writeTypedList(children);
  dest.writeParcelable(this.parent, 0);
}
 
Example 6
@Override
public void writeToParcel(Parcel dest, int flags) {

    dest.writeInt(total_number);
    dest.writeString(previous_cursor);
    dest.writeString(next_cursor);

    dest.writeTypedList(reposts);
}
 
Example 7
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(id);
    dest.writeInt(color);
    dest.writeString(name);
    dest.writeByte((byte) (isAI ? 1 : 0));
    dest.writeByte((byte) (isFinished ? 1 : 0));
    dest.writeTypedList(figures);
    dest.writeInt(statistics.length);        // First write array length
    dest.writeIntArray(statistics);       // Then array content
}
 
Example 8
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.login);
    dest.writeString(this.path);
    dest.writeInt(this.position);
    dest.writeString(this.commitId);
    dest.writeTypedList(this.comments);
    dest.writeInt(this.line);
}
 
Example 9
Source Project: android-art-res   File: BookManagerImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
        throws RemoteException {
    switch (code) {
    case INTERFACE_TRANSACTION: {
        reply.writeString(DESCRIPTOR);
        return true;
    }
    case TRANSACTION_getBookList: {
        data.enforceInterface(DESCRIPTOR);
        List<Book> result = this.getBookList();
        reply.writeNoException();
        reply.writeTypedList(result);
        return true;
    }
    case TRANSACTION_addBook: {
        data.enforceInterface(DESCRIPTOR);
        Book arg0;
        if ((0 != data.readInt())) {
            arg0 = Book.CREATOR.createFromParcel(data);
        } else {
            arg0 = null;
        }
        this.addBook(arg0);
        reply.writeNoException();
        return true;
    }
    }
    return super.onTransact(code, data, reply, flags);
}
 
Example 10
Source Project: Loop   File: AuthorizedUser.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.uri);
    dest.writeString(this.name);
    dest.writeString(this.link);
    dest.writeString(this.location);
    dest.writeString(this.bio);
    dest.writeString(this.createdTime);
    dest.writeString(this.account);
    dest.writeTypedList(this.pictures);
}
 
Example 11
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeString(meshUuid);
    parcel.writeString(provisionerUuid);
    parcel.writeString(provisionerName);
    parcel.writeTypedList(allocatedUnicastRanges);
    parcel.writeTypedList(allocatedGroupRanges);
    parcel.writeTypedList(allocatedSceneRanges);
    parcel.writeInt(provisionerAddress);
    parcel.writeInt(globalTtl);
    parcel.writeByte((byte) (lastSelected ? 1 : 0));
}
 
Example 12
@Override
public void writeToParcel( Parcel dest, int flags ){
    super.writeToParcel( dest, flags );
    dest.writeString( this.date );
    dest.writeString( this.time );
    dest.writeInt( this.totalAmount );
    dest.writeInt( this.totalPrice );
    dest.writeTypedList( this.beers );
}
 
Example 13
Source Project: braintree_android   File: BraintreeError.java    License: MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(mField);
    dest.writeString(mMessage);
    dest.writeTypedList(mFieldErrors);
}
 
Example 14
Source Project: Album   File: AlbumFolder.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(name);
    dest.writeTypedList(mAlbumFiles);
    dest.writeByte((byte) (isChecked ? 1 : 0));
}
 
Example 15
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeString(id);
    parcel.writeString(label);
    parcel.writeTypedList(categoryOptions);
}
 
Example 16
Source Project: android-rxmvp   File: Data.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.modhash);
    dest.writeTypedList(this.children);
}
 
Example 17
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeTypedList(audio_features);
}
 
Example 18
Source Project: Phonograph   File: Album.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedList(songs);
}
 
Example 19
Source Project: MediaPickerPoject   File: Folder.java    License: MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.name);
    dest.writeInt(this.count);
    dest.writeTypedList(this.medias);
}
 
Example 20
Source Project: epoxy   File: CarouselData.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeLong(this.id);
  dest.writeTypedList(this.colors);
}