本文整理了Java中android.os.Parcel.writeIntArray()
方法的一些代码示例,展示了Parcel.writeIntArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.writeIntArray()
方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:writeIntArray
暂无
代码示例来源:origin: google/ExoPlayer
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mpegFramesBetweenReference);
dest.writeInt(bytesBetweenReference);
dest.writeInt(millisecondsBetweenReference);
dest.writeIntArray(bytesDeviations);
dest.writeIntArray(millisecondsDeviations);
}
代码示例来源:origin: google/ExoPlayer
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(groupIndex);
dest.writeInt(tracks.length);
dest.writeIntArray(tracks);
}
代码示例来源:origin: cSploit/android
public void writeToParcel(Parcel dest, int flags){
dest.writeString(alice);
dest.writeString(serial);
dest.writeString(mac);
dest.writeIntArray(magic);
}
代码示例来源:origin: hidroh/materialistic
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(id);
dest.writeLong(delay);
dest.writeLong(created);
dest.writeLong(karma);
dest.writeString(about);
dest.writeIntArray(submitted);
dest.writeTypedArray(submittedItems, flags);
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void writeToParcel(Parcel p, int flags) {
p.writeInt(width);
p.writeInt(height);
p.writeSerializable(config);
p.writeIntArray(colors);
}
代码示例来源:origin: rey5137/material
@Override
protected void onWriteToParcel(Parcel dest, int flags) {
dest.writeInt(mMode);
switch (mMode){
case MODE_MESSAGE:
dest.writeValue(mMessage);
break;
case MODE_ITEMS:
dest.writeArray(mItems);
dest.writeInt(mSelectedIndexes == null ? 0 : mSelectedIndexes[0]);
break;
case MODE_MULTI_ITEMS:
dest.writeArray(mItems);
int length = mSelectedIndexes == null ? 0 : mSelectedIndexes.length;
dest.writeInt(length);
if(length > 0)
dest.writeIntArray(mSelectedIndexes);
break;
}
}
代码示例来源:origin: airbnb/epoxy
@Override
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] = valueAt(i);
}
parcel.writeInt(size);
parcel.writeIntArray(keys);
parcel.writeParcelableArray(values, flags);
}
代码示例来源:origin: stackoverflow.com
dest.writeIntArray(keys);
dest.writeBooleanArray(values);
代码示例来源:origin: robolectric/robolectric
@Test
public void testWriteAndCreateNullIntArray() throws Exception {
parcel.writeIntArray(null);
parcel.setDataPosition(0);
assertThat(parcel.createIntArray()).isNull();
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testReadWriteIntArray() throws Exception {
final int[] ints = { 1, 2 };
parcel.writeIntArray(ints);
// Make sure a copy was stored.
ints[0] = 99;
ints[1] = 99;
parcel.setDataPosition(0);
final int[] ints2 = new int[ints.length];
parcel.readIntArray(ints2);
assertThat(ints2).isEqualTo(new int[] {1, 2});
}
代码示例来源:origin: hidroh/materialistic
parcel.writeLong(3);
parcel.writeString("about");
parcel.writeIntArray(new int[]{1, 2, 3});
parcel.writeTypedArray(new HackerNewsItem[]{
new HackerNewsItem(1L),
代码示例来源:origin: henrichg/PhoneProfilesPlus
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(mInputPointer);
if (mInput != null) {
dest.writeInt(mInput.length);
dest.writeIntArray(mInput);
} else {
dest.writeInt(0);
}
dest.writeInt(mSign);
}
代码示例来源:origin: mylhyl/Android-CircleDialog
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeIntArray(this.padding);
dest.writeString(this.text);
dest.writeInt(this.height);
dest.writeInt(this.backgroundColor);
dest.writeInt(this.textColor);
dest.writeInt(this.textSize);
dest.writeInt(this.gravity);
dest.writeInt(this.styleText);
}
}
代码示例来源:origin: WangDaYeeeeee/Mysplash
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeString(this.order);
out.writeInt(this.page);
int[] pages = new int[pageList.size()];
for (int i = 0; i < pages.length; i ++) {
pages[i] = pageList.get(i);
}
out.writeInt(pages.length);
out.writeIntArray(pages);
out.writeByte(this.over ? (byte) 1 : (byte) 0);
}
代码示例来源:origin: mylhyl/Android-CircleDialog
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.text);
dest.writeIntArray(this.padding);
dest.writeInt(this.height);
dest.writeInt(this.textSize);
dest.writeInt(this.textColor);
dest.writeInt(this.backgroundColor);
dest.writeInt(this.gravity);
dest.writeInt(this.styleText);
}
}
代码示例来源:origin: mylhyl/Android-CircleDialog
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(this.triangleGravity);
dest.writeInt(this.triangleOffSet);
dest.writeIntArray(this.triangleSize);
}
代码示例来源:origin: com.google.android/support-v4
public void writeToParcel(Parcel dest, int flags) {
dest.writeIntArray(mOps);
dest.writeInt(mTransition);
dest.writeInt(mTransitionStyle);
dest.writeString(mName);
dest.writeInt(mIndex);
dest.writeInt(mBreadCrumbTitleRes);
TextUtils.writeToParcel(mBreadCrumbTitleText, dest, 0);
dest.writeInt(mBreadCrumbShortTitleRes);
TextUtils.writeToParcel(mBreadCrumbShortTitleText, dest, 0);
}
代码示例来源:origin: com.albedinsky.android.support/support-dialogs
/**
*/
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
super.writeToParcel(dest, flags);
TextUtils.writeToParcel(content, dest, flags);
dest.writeString(progressFormat);
dest.writeInt(progressIndicatorVisible ? 1 : 0);
dest.writeIntArray(progress);
}
}
代码示例来源:origin: com.albedinsky.android/dialogs
/**
*/
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
super.writeToParcel(dest, flags);
TextUtils.writeToParcel(content, dest, flags);
dest.writeString(progressFormat);
dest.writeInt(progressIndicatorVisible ? 1 : 0);
dest.writeIntArray(progress);
}
}
代码示例来源:origin: org.robolectric/shadows-core
@Implementation
public void writeToParcel(Parcel p, int flags) {
p.writeInt(width);
p.writeInt(height);
p.writeSerializable(config);
p.writeIntArray(colors);
}
内容来源于网络,如有侵权,请联系作者删除!