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

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

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

Parcel.createStringArray介绍

[英]Read and return a new ArrayList containing String objects from the parcel that was written with #writeStringList at the current dataPosition(). Returns null if the previously written list object was null.
[中]读取并返回一个新的ArrayList,其中包含在当前dataPosition()处使用#writeStringList写入的包裹中的字符串对象。如果之前写入的列表对象为null,则返回null。

代码示例

代码示例来源:origin: bluelinelabs/Conductor

PendingPermissionRequest(Parcel in) {
  instanceId = in.readString();
  permissions = in.createStringArray();
  requestCode = in.readInt();
}

代码示例来源:origin: google/ExoPlayer

/* package */ ChapterTocFrame(Parcel in) {
 super(ID);
 this.elementId = castNonNull(in.readString());
 this.isRoot = in.readByte() != 0;
 this.isOrdered = in.readByte() != 0;
 this.children = in.createStringArray();
 int subFrameCount = in.readInt();
 subFrames = new Id3Frame[subFrameCount];
 for (int i = 0; i < subFrameCount; i++) {
  subFrames[i] = in.readParcelable(Id3Frame.class.getClassLoader());
 }
}

代码示例来源:origin: android-hacker/VirtualXposed

protected SessionParams(Parcel in) {
  this.mode = in.readInt();
  this.installFlags = in.readInt();
  this.installLocation = in.readInt();
  this.sizeBytes = in.readLong();
  this.appPackageName = in.readString();
  this.appIcon = in.readParcelable(Bitmap.class.getClassLoader());
  this.appLabel = in.readString();
  this.appIconLastModified = in.readLong();
  this.originatingUri = in.readParcelable(Uri.class.getClassLoader());
  this.referrerUri = in.readParcelable(Uri.class.getClassLoader());
  this.abiOverride = in.readString();
  this.volumeUuid = in.readString();
  this.grantedRuntimePermissions = in.createStringArray();
}

代码示例来源:origin: seven332/EhViewer

protected GalleryApiInfo(Parcel in) {
  this.gid = in.readLong();
  this.token = in.readString();
  this.archiverKey = in.readString();
  this.title = in.readString();
  this.titleJpn = in.readString();
  this.category = in.readInt();
  this.thumb = in.readString();
  this.uploader = in.readString();
  this.posted = in.readLong();
  this.filecount = in.readInt();
  this.filesize = in.readLong();
  this.expunged = in.readByte() != 0;
  this.rating = in.readFloat();
  this.torrentcount = in.readInt();
  this.tags = in.createStringArray();
}

代码示例来源:origin: seven332/EhViewer

protected GalleryInfo(Parcel in) {
  this.gid = in.readLong();
  this.token = in.readString();
  this.title = in.readString();
  this.titleJpn = in.readString();
  this.thumb = in.readString();
  this.category = in.readInt();
  this.posted = in.readString();
  this.uploader = in.readString();
  this.rating = in.readFloat();
  this.simpleLanguage = in.readString();
  this.simpleTags = in.createStringArray();
  this.thumbWidth = in.readInt();
  this.thumbHeight = in.readInt();
  this.spanSize = in.readInt();
  this.spanIndex = in.readInt();
  this.spanGroupIndex = in.readInt();
}

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

@Test
public void testWriteAndCreateNullStringArray() throws Exception {
 parcel.writeStringArray(null);
 parcel.setDataPosition(0);
 assertThat(parcel.createStringArray()).isNull();
}

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

@Test
public void testCreateStringArray() {
 String[] strs = { "a1", "b2" };
 parcel.writeStringArray(strs);
 parcel.setDataPosition(0);
 String[] newStrs = parcel.createStringArray();
 assertTrue(Arrays.equals(strs, newStrs));
}

代码示例来源:origin: jaredrummler/AndroidProcesses

private Statm(Parcel in) {
 super(in);
 this.fields = in.createStringArray();
}

代码示例来源:origin: jaredrummler/AndroidProcesses

private Stat(Parcel in) {
 super(in);
 this.fields = in.createStringArray();
}

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

this.mItems = in.createStringArray();
mSelectedItemPosition = in.readInt();

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

private Vitamin(Parcel in){
  theName = in.readString();
  theBenefits = in.createStringArray();
  theFoods = in.createStringArray();
}

代码示例来源:origin: Justson/AgentWebX5

protected Action(Parcel in) {
  permissions = in.createStringArray();
  action = in.readInt();
  fromIntention = in.readInt();
}

代码示例来源:origin: IanGClifton/auid2

private Tool(Parcel in) {
  this.mName = in.readString();
  this.mPrice = in.readString();
  this.mDetails = in.createStringArray();
  this.mDescription = in.readString();
}

代码示例来源:origin: consp1racy/android-support-preference

public SavedState(@NonNull Parcel source) {
  super(source);
  values = new HashSet<>();
  String[] strings = source.createStringArray();
  Collections.addAll(values, strings);
}

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

public RemoteInputParcel(Parcel in) {
  label = in.readString();
  resultKey = in.readString();
  choices = in.createStringArray();
  allowFreeFormInput = in.readByte() != 0;
  extras = in.readParcelable(Bundle.class.getClassLoader());
}

代码示例来源:origin: moyokoo/Diooto

protected DiootoConfig(Parcel in) {
  this.type = in.readInt();
  this.imageUrls = in.createStringArray();
  this.isFullScreen = in.readByte() != 0;
  this.contentViewOriginModels = in.createTypedArrayList(ContentViewOriginModel.CREATOR);
  this.position = in.readInt();
}

代码示例来源:origin: 8enet/AppOpsX

protected ClassCaller(Parcel in) {
  this.packageName = in.readString();
  this.className = in.readString();
  this.sParamsType = in.createStringArray();
  this.params = in.readArray(Object[].class.getClassLoader());
}

代码示例来源:origin: 8enet/AppOpsX

protected SystemServiceCaller(Parcel in) {
  this.serviceName = in.readString();
  this.methodName = in.readString();
  this.sParamsType = in.createStringArray();
  this.params = in.readArray(Object[].class.getClassLoader());
}

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

@Override
  public SingleModels createFromParcel(Parcel source) {
    SingleModels models = new SingleModels();
    models.name = source.readString();
    models.names = source.createStringArray();
    return models;
}

代码示例来源:origin: gitskarios/GithubAndroidSdk

protected IssueRequest(Parcel in) {
 super(in);
 this.title = in.readString();
 this.body = in.readString();
 this.assignee = in.readString();
 this.milestone = (Integer) in.readValue(Integer.class.getClassLoader());
 this.milestoneName = in.readString();
 this.labels = in.createStringArray();
 int tmpState = in.readInt();
 this.state = tmpState == -1 ? null : IssueState.values()[tmpState];
}

相关文章

Parcel类方法