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

The following are Jave code examples for showing how to use readIntArray() 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: airgram   File: StaggeredGridLayoutManager.java   View Source Code Vote up 6 votes
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());
}
 
Example 2
Project: Bigbang   File: MarkSizeView.java   View Source Code Vote up 6 votes
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]);
    }
}
 
Example 3
Project: PlusGram   File: StaggeredGridLayoutManager.java   View Source Code Vote up 6 votes
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());
}
 
Example 4
Project: mesh-core-on-android   File: MeshElementInfo.java   View Source Code Vote up 6 votes
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;
}
 
Example 5
Project: android_ui   File: CircularNumberPicker.java   View Source Code Vote up 5 votes
/**
 * 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();
}
 
Example 6
Project: airgram   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 7
Project: letv   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 8
Project: letv   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
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());
}
 
Example 9
Project: choreographer-example   File: TransitioningChoreographer.java   View Source Code Vote up 5 votes
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];
    }
}
 
Example 10
Project: cwac-crossport   File: CoordinatorLayout.java   View Source Code Vote up 5 votes
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]);
  }
}
 
Example 11
Project: iosched-reader   File: TagFilterHolder.java   View Source Code Vote up 5 votes
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;
}
 
Example 12
Project: PlusGram   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 13
Project: Pocket-Plays-for-Twitch   File: Game.java   View Source Code Vote up 5 votes
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];
}
 
Example 14
Project: boohee_v5.6   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
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);
    }
}
 
Example 15
Project: boohee_v5.6   File: StaggeredGridLayoutManager.java   View Source Code Vote up 5 votes
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());
}
 
Example 16
Project: boohee_v5.6   File: ParcelableSparseArray.java   View Source Code Vote up 5 votes
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]);
    }
}
 
Example 17
Project: boohee_v5.6   File: CoordinatorLayout.java   View Source Code Vote up 5 votes
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]);
    }
}
 
Example 18
Project: Rotatable-Scalable-Font   File: WidgetTextBean.java   View Source Code Vote up 5 votes
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();
}
 
Example 19
Project: primitive-collections-android   File: IntArrayList.java   View Source Code Vote up 4 votes
private IntArrayList(@NonNull final Parcel in) {
    mSize = in.readInt();
    final int length = in.readInt();
    mItems = new int[length];
    in.readIntArray(mItems);
}