android.os.Parcel.writeDoubleArray()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中android.os.Parcel.writeDoubleArray()方法的一些代码示例,展示了Parcel.writeDoubleArray()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.writeDoubleArray()方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:writeDoubleArray

Parcel.writeDoubleArray介绍

暂无

代码示例

代码示例来源:origin: robolectric/robolectric

@Test
public void testWriteAndCreateNullDoubleArray() throws Exception {
 parcel.writeDoubleArray(null);
 parcel.setDataPosition(0);
 assertThat(parcel.createDoubleArray()).isNull();
}

代码示例来源:origin: robolectric/robolectric

@Test
public void testReadWriteDoubleArray() throws Exception {
 final double[] doubles = { 1.1f, 2.0f };
 parcel.writeDoubleArray(doubles);
 parcel.setDataPosition(0);
 final double[] doubles2 = new double[doubles.length];
 parcel.readDoubleArray(doubles2);
 assertTrue(Arrays.equals(doubles, doubles2));
}

代码示例来源:origin: posm/OpenMapKitAndroid

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeDoubleArray(this.mStorage);
}

代码示例来源:origin: codezjx/AndLinker

@Override
public void writeToParcel(Parcel dest, int flags, double[] val) {
  dest.writeDoubleArray(val);
}

代码示例来源:origin: andforce/iBeebo

@Override
public void writeToParcel(Parcel dest, int flags) {
  // TODO Auto-generated method stub
  dest.writeString(type);
  dest.writeDoubleArray(coordinates);
}

代码示例来源:origin: andforce/iBeebo

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(type);
  dest.writeDoubleArray(coordinates);
}

代码示例来源:origin: gpfduoduo/AirPlay-Receiver-on-Android

@Override
public void writeToParcel(Parcel out, int flags) {
  super.writeToParcel(out, flags);
  out.writeDoubleArray(mSegments);
}

代码示例来源:origin: stackoverflow.com

private double[] mDoubleArray;
private Calendar mCalendar;

private void readFromParcel(Parcel source) {
mDoubleArray= new double[source.readDouble()];
Calendar instance = Calendar.getInstance();
instance.setTimeInMillis(source.readLong());
mGroupKey = instance;
}

  @Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeDoubleArray(mDoubleArray == null || mDoubleArray.length == 0 ? new double[] {} : mDoubleArray);  
dest.writeLong(mCalendar.getTimeInMillis());

}

代码示例来源:origin: proninyaroslav/libretorrent

@Override
public void writeToParcel(Parcel dest, int flags)
{
  super.writeToParcel(dest, flags);
  dest.writeString(torrentId);
  dest.writeLongArray(filesReceivedBytes);
  dest.writeInt(totalSeeds);
  dest.writeInt(seeds);
  dest.writeInt(downloadedPieces);
  dest.writeDouble(shareRatio);
  dest.writeLong(activeTime);
  dest.writeLong(seedingTime);
  dest.writeDouble(availability);
  dest.writeDoubleArray(filesAvailability);
}

相关文章

Parcel类方法