Java Code Examples for android.os.Parcel.writeIntArray()

The following are Jave code examples for showing how to use writeIntArray() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: SimpleDialogFragments   File: Input.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeString(hint);
    dest.writeInt(hintResourceId);
    dest.writeString(text);
    dest.writeInt(textResourceId);
    dest.writeInt(inputType);
    dest.writeInt(maxLength);
    dest.writeInt(minLength);
    dest.writeInt(suggestionArrayRes);
    dest.writeIntArray(suggestionStringResArray);
    dest.writeStringArray(suggestions);
    dest.writeByte((byte) (passwordToggleVisible ? 1 : 0));
    dest.writeByte((byte) (forceSuggestion ? 1 : 0));
    dest.writeString(pattern);
    dest.writeString(patternError);
    dest.writeInt(patternErrorId);
}
 
Example 2
Project: PlusGram   File: StaggeredGridLayoutManager.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mAnchorPosition);
    dest.writeInt(mVisibleAnchorPosition);
    dest.writeInt(mSpanOffsetsSize);
    if (mSpanOffsetsSize > 0) {
        dest.writeIntArray(mSpanOffsets);
    }
    dest.writeInt(mSpanLookupSize);
    if (mSpanLookupSize > 0) {
        dest.writeIntArray(mSpanLookup);
    }
    dest.writeInt(mReverseLayout ? 1 : 0);
    dest.writeInt(mAnchorLayoutFromEnd ? 1 : 0);
    dest.writeInt(mLastLayoutRTL ? 1 : 0);
    dest.writeList(mFullSpanItems);
}
 
Example 3
Project: data-mediator   File: HistoryData.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.age);
    dest.writeLong(this.id);
    dest.writeInt(this.testShort);
    dest.writeByte(this.testByte);
    dest.writeByte(this.testBoolean ? (byte) 1 : (byte) 0);
    dest.writeFloat(this.testFloat);
    dest.writeDouble(this.testDouble);
    dest.writeInt(this.testChar);
    dest.writeValue(this.testLONG);
    dest.writeValue(this.testDOUBLE);
    dest.writeSerializable(this.testCharacter);
    dest.writeValue(this.testBOOLEAN);
    dest.writeValue(this.testSHORT);
    dest.writeString(this.name);
    dest.writeParcelable(this.data, flags);
    dest.writeTypedList(this.datas);
    dest.writeTypedArray(this.testArrayResultData, flags);
    dest.writeIntArray(this.testArrayInt);
    dest.writeArray(this.testArrayInteger);
}
 
Example 4
Project: Pocket-Plays-for-Twitch   File: Game.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
	String[] toSend = new String[] {
		gameTitle,
		gamePreviewSmallURL,
		gamePreviewMediumURL,
		gamePreviewLargeURL
	};

	int[] integers = new int[] {
			gameViewers,
			gameStreamers
	};

	dest.writeStringArray(toSend);
	dest.writeIntArray(integers);
}
 
Example 5
Project: AndroidShareElement   File: ShareElementInfo.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(mOriginalLocation);
    dest.writeIntArray(mTargetLocation);
    dest.writeFloatArray(mOriginalValues);
    dest.writeFloatArray(mTargetValues);
    dest.writeInt(mOriginalWidth);
    dest.writeInt(mOriginalHeight);
    dest.writeInt(mTargetWidth);
    dest.writeInt(mTargetHeight);
    dest.writeInt(mOriginalViewWidth);
    dest.writeInt(mOriginalViewHeight);
    dest.writeInt(mTargetViewWidth);
    dest.writeInt(mTargetViewHeight);
    dest.writeInt(mCenterOffsetX);
    dest.writeInt(mCenterOffsetY);
    dest.writeFloat(mScaleX);
    dest.writeFloat(mScaleY);
    dest.writeFloat(mPivotX);
    dest.writeFloat(mPivotY);
}
 
Example 6
Project: cwac-crossport   File: CoordinatorLayout.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
  super.writeToParcel(dest, flags);

  final int size = behaviorStates != null ? behaviorStates.size() : 0;
  dest.writeInt(size);

  final int[] ids = new int[size];
  final Parcelable[] states = new Parcelable[size];

  for (int i = 0; i < size; i++) {
    ids[i] = behaviorStates.keyAt(i);
    states[i] = behaviorStates.valueAt(i);
  }
  dest.writeIntArray(ids);
  dest.writeParcelableArray(states, flags);

}
 
Example 7
Project: FullSizePopupSpinner   File: FullSizePopupSpinner.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeIntArray(mItemsTextsResIds);
    out.writeInt(mSelectedItemPosition);
    out.writeIntArray(mItemsIconsResIds);
}
 
Example 8
Project: android_ui   File: CircularNumberPicker.java   View Source Code Vote up 5 votes
/**
 */
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
	super.writeToParcel(dest, flags);
	dest.writeInt(selection);
	dest.writeInt(selectionRange);
	dest.writeInt(numbers.length);
	dest.writeIntArray(numbers);
	dest.writeSerializable(numberFormat);
}
 
Example 9
Project: Phoenix-for-VK   File: BaseOption.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(optionType);
    dest.writeInt(key);
    dest.writeByte((byte) (active ? 1 : 0));
    dest.writeInt(title);
    dest.writeInt(parentDependencyKey);
    dest.writeIntArray(childDependencies);
}
 
Example 10
Project: airgram   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mPosition);
    dest.writeInt(mGapDir);
    dest.writeInt(mHasUnwantedGapAfter ? 1 : 0);
    if (mGapPerSpan != null && mGapPerSpan.length > 0) {
        dest.writeInt(mGapPerSpan.length);
        dest.writeIntArray(mGapPerSpan);
    } else {
        dest.writeInt(0);
    }
}
 
Example 11
Project: anycall   File: Anycall.java   View Source Code Vote up 5 votes
public void callMethod(final String className, final String serviceName,
                       final String methodName, final Object... paramsAndListener) {
    Parcel data = Parcel.obtain();
    data.writeInterfaceToken(className);
    for (int i = 0; i < paramsAndListener.length - 1; i++) {
        Object p = paramsAndListener[i];
        if (p instanceof Byte)
            data.writeByte((Byte) p);
        else if (p instanceof Integer)
            data.writeInt((Integer) p);
        else if (p instanceof Long)
            data.writeLong((Long) p);
        else if (p instanceof String)
            data.writeString((String) p);
        else if (p instanceof Bundle)
            data.writeBundle((Bundle) p);
        else if (p instanceof Float)
            data.writeFloat((Float) p);
        else if (p instanceof FileDescriptor)
            data.writeFileDescriptor((FileDescriptor) p);
        else if (p instanceof List)
            data.writeList((List) p);
        else if (p instanceof Exception)
            data.writeException((Exception) p);
        else if (p instanceof IBinder)
            data.writeStrongBinder((IBinder) p);
        else if (p instanceof Double)
            data.writeDouble((Double) p);
        else if (p instanceof Map)
            data.writeMap((Map) p);
        else if (p instanceof boolean[])
            data.writeBooleanArray((boolean[]) p);
        else if (p instanceof byte[])
            data.writeByteArray((byte[]) p);
        else if (p instanceof char[])
            data.writeCharArray((char[]) p);
        else if (p instanceof int[])
            data.writeIntArray((int[]) p);
        else if (p instanceof IBinder[])
            data.writeBinderArray((IBinder[]) p);
        else if (p instanceof double[])
            data.writeDoubleArray((double[]) p);
        else if (p instanceof Object[])
            data.writeArray((Object[]) p);
        else data.writeValue(p);
    }

    Object lastParam = paramsAndListener[paramsAndListener.length - 1];
    CallMethodResultListener listener = lastParam == null ? null :
            (CallMethodResultListener) lastParam;

    callMethod(className, serviceName, methodName, data, listener);
    data.recycle();
}
 
Example 12
Project: boohee_v5.6   File: ParcelableSparseArray.java   View Source Code Vote up 5 votes
public void writeToParcel(Parcel parcel, int flags) {
    int size = size();
    int[] keys = new int[size];
    Parcelable[] values = new Parcelable[size];
    for (int i = 0; i < size; i++) {
        keys[i] = keyAt(i);
        values[i] = (Parcelable) valueAt(i);
    }
    parcel.writeInt(size);
    parcel.writeIntArray(keys);
    parcel.writeParcelableArray(values, flags);
}
 
Example 13
Project: choreographer-example   File: TransitioningChoreographer.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    int[] statesArray = new int[]{taggingStates[0].ordinal(), taggingStates[1].ordinal()};
    dest.writeIntArray(statesArray);
    dest.writeLongArray(startTimes);
    dest.writeLong(transitionStartTime);
}
 
Example 14
Project: boohee_v5.6   File: BackStackState.java   View Source Code Vote up 5 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(this.mOps);
    dest.writeInt(this.mTransition);
    dest.writeInt(this.mTransitionStyle);
    dest.writeString(this.mName);
    dest.writeInt(this.mIndex);
    dest.writeInt(this.mBreadCrumbTitleRes);
    TextUtils.writeToParcel(this.mBreadCrumbTitleText, dest, 0);
    dest.writeInt(this.mBreadCrumbShortTitleRes);
    TextUtils.writeToParcel(this.mBreadCrumbShortTitleText, dest, 0);
    dest.writeStringList(this.mSharedElementSourceNames);
    dest.writeStringList(this.mSharedElementTargetNames);
}
 
Example 15
Project: NumberPadTimePicker   File: NumberPadTimePicker.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeIntArray(mNptpState.getDigits());
    out.writeInt(mNptpState.getCount());
    out.writeInt(mNptpState.getAmPmState());
}
 
Example 16
Project: Veggietizer   File: Achievement.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeIntArray(new int[] {amount, duration, category.ordinal()});
    out.writeParcelable(nextCriterion, flags);
}
 
Example 17
Project: Bigbang   File: MarkSizeView.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(pathX.size());
    dest.writeIntArray(getXArray());
    dest.writeIntArray(getYArray());
}
 
Example 18
Project: iosched-reader   File: TagFilterHolder.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeStringArray(mSelectedFilters.toArray(new String[mSelectedFilters.size()]));
    dest.writeIntArray(mCategories);
    dest.writeInt(mShowLiveStreamedSessions ? 1 : 0);
}
 
Example 19
Project: Veggietizer   File: Achievement.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeStringArray(new String[]{description, heading, shareText});
    out.writeIntArray(new int[]{iconLockedID, iconUnlockedID});
    out.writeParcelable(criterion, flags);
}
 
Example 20
Project: AndProx   File: TuneResult.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(graphData);
}