本文整理汇总了Java中android.os.Parcel.readInt方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.readInt方法的具体用法?Java Parcel.readInt怎么用?Java Parcel.readInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.readInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: createFromParcel
import android.os.Parcel; //导入方法依赖的package包/类
public OpenPgpMetadata createFromParcel(final Parcel source) {
int version = source.readInt(); // parcelableVersion
int parcelableSize = source.readInt();
int startPosition = source.dataPosition();
OpenPgpMetadata vr = new OpenPgpMetadata();
vr.filename = source.readString();
vr.mimeType = source.readString();
vr.modificationTime = source.readLong();
vr.originalSize = source.readLong();
if (version >= 2) {
vr.charset = source.readString();
}
// skip over all fields added in future versions of this parcel
source.setDataPosition(startPosition + parcelableSize);
return vr;
}
示例3: RecordSport
import android.os.Parcel; //导入方法依赖的package包/类
protected RecordSport(Parcel in) {
boolean z = true;
this.id = in.readInt();
this.record_on = in.readString();
this.duration = in.readFloat();
this.activity_id = in.readInt();
this.activity_name = in.readString();
this.calory = in.readFloat();
this.thumb_img_url = in.readString();
this.unit_name = in.readString();
this.mets = in.readFloat();
if (in.readByte() == (byte) 0) {
z = false;
}
this.isChecked = z;
}
示例4: BeaconDevice
import android.os.Parcel; //导入方法依赖的package包/类
private BeaconDevice(Parcel in) {
this.bluetoothDevice = in.readParcelable(BluetoothDevice.class.getClassLoader());
this.rssi = in.readInt();
this.scanRecord = in.createByteArray();
this.deviceName = in.readString();
this.iBeacon = in.readParcelable(IBeacon.class.getClassLoader());
this.lastUpdatedTimeMillis = in.readLong();
}
示例5: Repository
import android.os.Parcel; //导入方法依赖的package包/类
protected Repository(Parcel in) {
this.id = in.readInt();
this.name = in.readString();
this.fullName = in.readString();
this.repPrivate = in.readByte() != 0;
this.htmlUrl = in.readString();
this.description = in.readString();
this.language = in.readString();
this.owner = in.readParcelable(User.class.getClassLoader());
this.defaultBranch = in.readString();
long tmpCreatedAt = in.readLong();
this.createdAt = tmpCreatedAt == -1 ? null : new Date(tmpCreatedAt);
long tmpUpdatedAt = in.readLong();
this.updatedAt = tmpUpdatedAt == -1 ? null : new Date(tmpUpdatedAt);
long tmpPushedAt = in.readLong();
this.pushedAt = tmpPushedAt == -1 ? null : new Date(tmpPushedAt);
this.gitUrl = in.readString();
this.sshUrl = in.readString();
this.cloneUrl = in.readString();
this.svnUrl = in.readString();
this.size = in.readInt();
this.stargazersCount = in.readInt();
this.watchersCount = in.readInt();
this.forksCount = in.readInt();
this.openIssuesCount = in.readInt();
this.subscribersCount = in.readInt();
this.fork = in.readByte() != 0;
this.parent = in.readParcelable(Repository.class.getClassLoader());
this.permissions = in.readParcelable(RepositoryPermissions.class.getClassLoader());
this.hasIssues = in.readByte() != 0;
this.hasProjects = in.readByte() != 0;
this.hasDownloads = in.readByte() != 0;
this.hasWiki = in.readByte() != 0;
this.hasPages = in.readByte() != 0;
this.sinceStargazersCount = in.readInt();
int tmpTrendingSince = in.readInt();
this.since = tmpTrendingSince == -1 ? null : TrendingSince.values()[tmpTrendingSince];
}
示例6: PendingResultData
import android.os.Parcel; //导入方法依赖的package包/类
protected PendingResultData(Parcel in) {
this.mType = in.readInt();
this.mOrderedHint = in.readByte() != 0;
this.mInitialStickyHint = in.readByte() != 0;
this.mToken = in.readStrongBinder();
this.mSendingUser = in.readInt();
this.mFlags = in.readInt();
this.mResultCode = in.readInt();
this.mResultData = in.readString();
this.mResultExtras = in.readBundle();
this.mAbortBroadcast = in.readByte() != 0;
this.mFinished = in.readByte() != 0;
}
示例7: ActivityResult
import android.os.Parcel; //导入方法依赖的package包/类
protected ActivityResult(Parcel in) {
super(null,
(Uri) in.readParcelable(Uri.class.getClassLoader()),
(Exception) in.readSerializable(),
in.createFloatArray(),
(Rect) in.readParcelable(Rect.class.getClassLoader()),
in.readInt(), in.readInt());
}
示例8: IncomingTextMessage
import android.os.Parcel; //导入方法依赖的package包/类
public IncomingTextMessage(Parcel in) {
this.message = in.readString();
this.sender = in.readString();
this.senderDeviceId = in.readInt();
this.protocol = in.readInt();
this.serviceCenterAddress = in.readString();
this.replyPathPresent = (in.readInt() == 1);
this.pseudoSubject = in.readString();
this.sentTimestampMillis = in.readLong();
this.groupId = in.readString();
this.push = (in.readInt() == 1);
this.subscriptionId = in.readInt();
this.expiresInMillis = in.readLong();
}
示例9: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
SavedState(Parcel in, ClassLoader loader) {
super(in);
if (loader == null) {
loader = getClass().getClassLoader();
}
position = in.readInt();
adapterState = in.readParcelable(loader);
this.loader = loader;
}
示例10: VpnConfiguration
import android.os.Parcel; //导入方法依赖的package包/类
private VpnConfiguration(Parcel source) {
int count = source.readInt();
dnsServers = new InetAddress[count];
try {
for (int i = 0; i < count; ++i) {
dnsServers[i] = InetAddress.getByAddress(source.createByteArray());
}
} catch (UnknownHostException e) {
throw new AssertionError("Invalid address", e);
}
}
示例11: User
import android.os.Parcel; //导入方法依赖的package包/类
protected User(Parcel in) {
this.id = in.readInt();
this.name = in.readString();
this.username = in.readString();
this.html_url = in.readString();
this.avatar_url = in.readString();
this.bio = in.readString();
this.location = in.readString();
this.links = in.readParcelable(Links.class.getClassLoader());
this.buckets_count = in.readInt();
this.comments_received_count = in.readInt();
this.followers_count = in.readInt();
this.followings_count = in.readInt();
this.likes_count = in.readInt();
this.likes_received_count = in.readInt();
this.projects_count = in.readInt();
this.rebounds_received_count = in.readInt();
this.shots_count = in.readInt();
this.teams_count = in.readInt();
this.can_upload_shot = in.readByte() != 0;
this.type = in.readString();
this.pro = in.readByte() != 0;
this.buckets_url = in.readString();
this.followers_url = in.readString();
this.following_url = in.readString();
this.likes_url = in.readString();
this.projects_url = in.readString();
this.shots_url = in.readString();
this.teams_url = in.readString();
this.created_at = in.readString();
this.updated_at = in.readString();
}
示例12: ActivityResult
import android.os.Parcel; //导入方法依赖的package包/类
protected ActivityResult(Parcel in) {
super(
null,
(Uri) in.readParcelable(Uri.class.getClassLoader()),
null,
(Uri) in.readParcelable(Uri.class.getClassLoader()),
(Exception) in.readSerializable(),
in.createFloatArray(),
(Rect) in.readParcelable(Rect.class.getClassLoader()),
(Rect) in.readParcelable(Rect.class.getClassLoader()),
in.readInt(),
in.readInt());
}
示例13: Entry
import android.os.Parcel; //导入方法依赖的package包/类
protected Entry(Parcel in) {
id = in.readInt();
name = in.readInt();
}
示例14: Attachment
import android.os.Parcel; //导入方法依赖的package包/类
protected Attachment(final Parcel in) {
id = in.readLong();
claimItemId = in.readLong();
file = new File(in.readString());
type = Type.values()[in.readInt()];
}
示例15: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
private SavedState(Parcel in) {
super(in);
isChecked = 1 == in.readInt();
}