當前位置: 首頁>>代碼示例>>Java>>正文


Java Parcel.writeIntArray方法代碼示例

本文整理匯總了Java中android.os.Parcel.writeIntArray方法的典型用法代碼示例。如果您正苦於以下問題:Java Parcel.writeIntArray方法的具體用法?Java Parcel.writeIntArray怎麽用?Java Parcel.writeIntArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Parcel的用法示例。


在下文中一共展示了Parcel.writeIntArray方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:eltos,項目名稱:SimpleDialogFragments,代碼行數:20,代碼來源:Input.java

示例2: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:pooyafaroka,項目名稱:PlusGram,代碼行數:18,代碼來源:StaggeredGridLayoutManager.java

示例3: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:LightSun,項目名稱:data-mediator,代碼行數:23,代碼來源:HistoryData.java

示例4: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:18,代碼來源:Game.java

示例5: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:idisfkj,項目名稱:AndroidShareElement,代碼行數:22,代碼來源:ShareElementInfo.java

示例6: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);

}
 
開發者ID:commonsguy,項目名稱:cwac-crossport,代碼行數:19,代碼來源:CoordinatorLayout.java

示例7: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeIntArray(mItemsTextsResIds);
    out.writeInt(mSelectedItemPosition);
    out.writeIntArray(mItemsIconsResIds);
}
 
開發者ID:AndroidDeveloperLB,項目名稱:FullSizePopupSpinner,代碼行數:8,代碼來源:FullSizePopupSpinner.java

示例8: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
/**
 */
@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);
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:12,代碼來源:CircularNumberPicker.java

示例9: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:PhoenixDevTeam,項目名稱:Phoenix-for-VK,代碼行數:10,代碼來源:BaseOption.java

示例10: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
    }
}
 
開發者ID:MLNO,項目名稱:airgram,代碼行數:13,代碼來源:StaggeredGridLayoutManager.java

示例11: callMethod

import android.os.Parcel; //導入方法依賴的package包/類
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();
}
 
開發者ID:ztc1997,項目名稱:anycall,代碼行數:55,代碼來源:Anycall.java

示例12: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
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);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:13,代碼來源:ParcelableSparseArray.java

示例13: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@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);
}
 
開發者ID:shazam,項目名稱:choreographer-example,代碼行數:8,代碼來源:TransitioningChoreographer.java

示例14: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
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);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:14,代碼來源:BackStackState.java

示例15: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeIntArray(mNptpState.getDigits());
    out.writeInt(mNptpState.getCount());
    out.writeInt(mNptpState.getAmPmState());
}
 
開發者ID:philliphsu,項目名稱:NumberPadTimePicker,代碼行數:8,代碼來源:NumberPadTimePicker.java


注:本文中的android.os.Parcel.writeIntArray方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。