当前位置: 首页>>代码示例>>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;未经允许,请勿转载。