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


Java Parcel.readIntArray方法代碼示例

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


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

示例1: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
SavedState(Parcel in) {
    mAnchorPosition = in.readInt();
    mVisibleAnchorPosition = in.readInt();
    mSpanOffsetsSize = in.readInt();
    if (mSpanOffsetsSize > 0) {
        mSpanOffsets = new int[mSpanOffsetsSize];
        in.readIntArray(mSpanOffsets);
    }

    mSpanLookupSize = in.readInt();
    if (mSpanLookupSize > 0) {
        mSpanLookup = new int[mSpanLookupSize];
        in.readIntArray(mSpanLookup);
    }
    mReverseLayout = in.readInt() == 1;
    mAnchorLayoutFromEnd = in.readInt() == 1;
    mLastLayoutRTL = in.readInt() == 1;
    //noinspection unchecked
    mFullSpanItems = in.readArrayList(
            LazySpanLookup.FullSpanItem.class.getClassLoader());
}
 
開發者ID:MLNO,項目名稱:airgram,代碼行數:22,代碼來源:StaggeredGridLayoutManager.java

示例2: GraphicPath

import android.os.Parcel; //導入方法依賴的package包/類
protected GraphicPath(Parcel in) {
    int size=in.readInt();
    int[] x=new int[size];
    int[] y=new int[size];
    in.readIntArray(x);
    in.readIntArray(y);
    pathX=new ArrayList<>();
    pathY=new ArrayList<>();

    for (int i=0;i<x.length;i++){
        pathX.add(x[i]);
    }

    for (int i=0;i<y.length;i++){
        pathY.add(y[i]);
    }
}
 
開發者ID:l465659833,項目名稱:Bigbang,代碼行數:18,代碼來源:MarkSizeView.java

示例3: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
public MeshElementInfo createFromParcel(Parcel in) {
	MeshElementInfo eltInfo = new MeshElementInfo();
	int n;
	byte[] tmp;

	n = in.readInt();
	tmp = new byte[n];
	in.readByteArray(tmp);
	eltInfo.mMids = byteArrayToShortArray(tmp);

	n = in.readInt();
	eltInfo.mVmids = new int[n];
	in.readIntArray(eltInfo.mVmids);

	return eltInfo;
}
 
開發者ID:blxble,項目名稱:mesh-core-on-android,代碼行數:17,代碼來源:MeshElementInfo.java

示例4: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
/**
 * Called from {@link #CREATOR} to create an instance of SavedState form the given parcel
 * <var>source</var>.
 *
 * @param source Parcel with data for the new instance.
 */
protected SavedState(@NonNull Parcel source) {
	super(source);
	this.selection = source.readInt();
	this.selectionRange = source.readInt();
	source.readIntArray(numbers = new int[source.readInt()]);
	this.numberFormat = (NumberFormat) source.readSerializable();
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:14,代碼來源:CircularNumberPicker.java

示例5: FullSpanItem

import android.os.Parcel; //導入方法依賴的package包/類
public FullSpanItem(Parcel in) {
    mPosition = in.readInt();
    mGapDir = in.readInt();
    mHasUnwantedGapAfter = in.readInt() == 1;
    int spanCount = in.readInt();
    if (spanCount > 0) {
        mGapPerSpan = new int[spanCount];
        in.readIntArray(mGapPerSpan);
    }
}
 
開發者ID:MLNO,項目名稱:airgram,代碼行數:11,代碼來源:StaggeredGridLayoutManager.java

示例6: FullSpanItem

import android.os.Parcel; //導入方法依賴的package包/類
public FullSpanItem(Parcel in) {
    boolean z = true;
    this.mPosition = in.readInt();
    this.mGapDir = in.readInt();
    if (in.readInt() != 1) {
        z = false;
    }
    this.mHasUnwantedGapAfter = z;
    int spanCount = in.readInt();
    if (spanCount > 0) {
        this.mGapPerSpan = new int[spanCount];
        in.readIntArray(this.mGapPerSpan);
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:15,代碼來源:StaggeredGridLayoutManager.java

示例7: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
SavedState(Parcel in) {
    boolean z;
    boolean z2 = true;
    this.mAnchorPosition = in.readInt();
    this.mVisibleAnchorPosition = in.readInt();
    this.mSpanOffsetsSize = in.readInt();
    if (this.mSpanOffsetsSize > 0) {
        this.mSpanOffsets = new int[this.mSpanOffsetsSize];
        in.readIntArray(this.mSpanOffsets);
    }
    this.mSpanLookupSize = in.readInt();
    if (this.mSpanLookupSize > 0) {
        this.mSpanLookup = new int[this.mSpanLookupSize];
        in.readIntArray(this.mSpanLookup);
    }
    this.mReverseLayout = in.readInt() == 1;
    if (in.readInt() == 1) {
        z = true;
    } else {
        z = false;
    }
    this.mAnchorLayoutFromEnd = z;
    if (in.readInt() != 1) {
        z2 = false;
    }
    this.mLastLayoutRTL = z2;
    this.mFullSpanItems = in.readArrayList(FullSpanItem.class.getClassLoader());
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:29,代碼來源:StaggeredGridLayoutManager.java

示例8: State

import android.os.Parcel; //導入方法依賴的package包/類
private State(Parcel in) {
    int[] ordinals = new int[2];
    in.readIntArray(ordinals);
    in.readLongArray(startTimes);
    this.transitionStartTime = in.readLong();

    int i = 0;
    for (int ordinal : ordinals) {
        taggingStates[i++] = FunkyView.State.values()[ordinal];
    }
}
 
開發者ID:shazam,項目名稱:choreographer-example,代碼行數:12,代碼來源:TransitioningChoreographer.java

示例9: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
public SavedState(Parcel source, ClassLoader loader) {
  super(source, loader);

  final int size = source.readInt();

  final int[] ids = new int[size];
  source.readIntArray(ids);

  final Parcelable[] states = source.readParcelableArray(loader);

  behaviorStates = new SparseArray<>(size);
  for (int i = 0; i < size; i++) {
    behaviorStates.append(ids[i], states[i]);
  }
}
 
開發者ID:commonsguy,項目名稱:cwac-crossport,代碼行數:16,代碼來源:CoordinatorLayout.java

示例10: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
public TagFilterHolder createFromParcel(Parcel in) {
    TagFilterHolder holder = new TagFilterHolder();

    String[] filters = in.createStringArray();
    in.readStringArray(filters);
    Collections.addAll(holder.mSelectedFilters, filters);

    int[] categories = in.createIntArray();
    in.readIntArray(categories);
    System.arraycopy(categories, 0, holder.mCategories, 0, categories.length);

    holder.mShowLiveStreamedSessions = in.readInt() == 1;

    return holder;
}
 
開發者ID:dreaminglion,項目名稱:iosched-reader,代碼行數:16,代碼來源:TagFilterHolder.java

示例11: Game

import android.os.Parcel; //導入方法依賴的package包/類
public Game(Parcel parcel) {
	String[] stringData = new String[4];
	int[] intData = new int[2];
	parcel.readStringArray(stringData);
	parcel.readIntArray(intData);

	gameTitle = stringData[0];
	gameViewers = intData[0];
	gameStreamers = intData[1];

	gamePreviewSmallURL = stringData[1];
	gamePreviewMediumURL = stringData[2];
	gamePreviewLargeURL = stringData[3];
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:15,代碼來源:Game.java

示例12: ParcelableSparseArray

import android.os.Parcel; //導入方法依賴的package包/類
public ParcelableSparseArray(Parcel source, ClassLoader loader) {
    int size = source.readInt();
    int[] keys = new int[size];
    source.readIntArray(keys);
    Parcelable[] values = source.readParcelableArray(loader);
    for (int i = 0; i < size; i++) {
        put(keys[i], values[i]);
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:10,代碼來源:ParcelableSparseArray.java

示例13: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
public SavedState(Parcel source, ClassLoader loader) {
    super(source);
    int size = source.readInt();
    int[] ids = new int[size];
    source.readIntArray(ids);
    Parcelable[] states = source.readParcelableArray(loader);
    this.behaviorStates = new SparseArray(size);
    for (int i = 0; i < size; i++) {
        this.behaviorStates.append(ids[i], states[i]);
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:12,代碼來源:CoordinatorLayout.java

示例14: WidgetTextBean

import android.os.Parcel; //導入方法依賴的package包/類
protected WidgetTextBean(Parcel in) {
    mTextSize = in.readInt();
    mTypeface = in.readString();
    mTextColor = new int[in.readInt()];
    in.readIntArray(mTextColor);
    mTextRect = in.readParcelable(Rect.class.getClassLoader());
    mTextGravity = in.readInt();
    mBackgroundRes = in.readInt();
    mImageRes = in.readInt();
    mImageX = in.readInt();
    mImageY = in.readInt();
    mImageGravity = in.readInt();
    mDefaultWidth = in.readInt();
    mDefaultHeight = in.readInt();
    mText = in.readString();
    mMinTextSize = in.readInt();
    mTextRotateAngle = in.readInt();
    mStrokeWidth = in.readFloat();
    mStrokeColor = new int[in.readInt()];
    in.readIntArray(mStrokeColor);
    mLetterSpace = in.readFloat();
    mTextStartXOffset = in.readFloat();
    mTextStartYOffset = in.readFloat();
    mImageWidth = in.readInt();
    mImageHeight = in.readInt();
    mTextColorGradient = in.readInt();
    mShadowRadius = in.readFloat();
    mShadowDisX = in.readFloat();
    mShadowDisY = in.readFloat();
    mShadowColor = in.readInt();
    mLineSpace = in.readFloat();
    mTextStrokeGradient = in.readInt();
}
 
開發者ID:MaYatKit,項目名稱:Rotatable-Scalable-Font,代碼行數:34,代碼來源:WidgetTextBean.java

示例15: IntArrayList

import android.os.Parcel; //導入方法依賴的package包/類
private IntArrayList(@NonNull final Parcel in) {
    mSize = in.readInt();
    final int length = in.readInt();
    mItems = new int[length];
    in.readIntArray(mItems);
}
 
開發者ID:GlobusLTD,項目名稱:primitive-collections-android,代碼行數:7,代碼來源:IntArrayList.java


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