本文整理汇总了Java中android.os.Parcel.createIntArray方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.createIntArray方法的具体用法?Java Parcel.createIntArray怎么用?Java Parcel.createIntArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.createIntArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: colorHasState
import android.os.Parcel; //导入方法依赖的package包/类
public static boolean colorHasState(ColorStateList color, int state) {
Parcel parcel = Parcel.obtain();
color.writeToParcel(parcel, 0);
// hack from ColorStateList.hasState(...)
final int specCount = parcel.readInt();
for (int specIndex = 0; specIndex < specCount; specIndex++) {
final int[] states = parcel.createIntArray();
final int stateCount = states.length;
for (int stateIndex = 0; stateIndex < stateCount; stateIndex++) {
if (states[stateIndex] == state || states[stateIndex] == ~state) {
return true;
}
}
}
return false;
// this is not good because it will return true only if the said 'state' is the only selector on the color
// int[] states = new int[]{state};
// return color.getColorForState(states, Integer.MIN_VALUE) != Integer.MIN_VALUE && color.getColorForState(states, Integer.MAX_VALUE) != Integer.MAX_VALUE;
}
示例2: Configuration
import android.os.Parcel; //导入方法依赖的package包/类
protected Configuration(Parcel in) {
image = in.readByte() != 0;
selectedList = in.createTypedArrayList(MediaBean.CREATOR);
radio = in.readByte() != 0;
crop = in.readByte() != 0;
maxSize = in.readInt();
hideBottomControls = in.readByte() != 0;
compressionQuality = in.readInt();
gestures = in.createIntArray();
maxBitmapSize = in.readInt();
maxScaleMultiplier = in.readFloat();
aspectRatioX = in.readFloat();
aspectRatioY = in.readFloat();
selectedByDefault = in.readInt();
aspectRatio = in.createTypedArray(AspectRatio.CREATOR);
freestyleCropEnabled = in.readByte() != 0;
ovalDimmedLayer = in.readByte() != 0;
maxResultWidth = in.readInt();
maxResultHeight = in.readInt();
imageLoaderType = in.readInt();
imageConfig = in.readInt();
hideCamera = in.readByte() != 0;
isPlayGif = in.readByte() != 0;
hidePreview = in.readByte() != 0;
isVideoPreview = in.readByte() != 0;
}
示例3: Input
import android.os.Parcel; //导入方法依赖的package包/类
private Input(Parcel in) {
super(in);
hint = in.readString();
hintResourceId = in.readInt();
text = in.readString();
textResourceId = in.readInt();
inputType = in.readInt();
maxLength = in.readInt();
minLength = in.readInt();
suggestionArrayRes = in.readInt();
suggestionStringResArray = in.createIntArray();
suggestions = in.createStringArray();
passwordToggleVisible = in.readByte() != 0;
forceSuggestion = in.readByte() != 0;
pattern = in.readString();
patternError = in.readString();
patternErrorId = in.readInt();
}
示例4: StreamInfo
import android.os.Parcel; //导入方法依赖的package包/类
public StreamInfo(Parcel in) {
String[] stringsData = in.createStringArray();
int[] intData = in.createIntArray();
if (stringsData.length == 2) {
this.game = stringsData[0];
this.title = stringsData[1];
}
if (intData.length == 2) {
this.currentViewers = intData[0];
this.priority = intData[1];
}
this.startedAt = in.readLong();
this.previews =in.createStringArray();
this.channelInfo = in.readParcelable(StreamInfo.class.getClassLoader());
}
示例5: HistoryData
import android.os.Parcel; //导入方法依赖的package包/类
protected HistoryData(Parcel in) {
this.age = in.readInt();
this.id = in.readLong();
this.testShort = (short) in.readInt();
this.testByte = in.readByte();
this.testBoolean = in.readByte() != 0;
this.testFloat = in.readFloat();
this.testDouble = in.readDouble();
this.testChar = (char) in.readInt();
this.testLONG = (Long) in.readValue(Long.class.getClassLoader());
this.testDOUBLE = (Double) in.readValue(Double.class.getClassLoader());
this.testCharacter = (Character) in.readSerializable();
this.testBOOLEAN = (Boolean) in.readValue(Boolean.class.getClassLoader());
this.testSHORT = (Short) in.readValue(Short.class.getClassLoader());
this.name = in.readString();
this.data = in.readParcelable(ResultData.class.getClassLoader());
this.datas = in.createTypedArrayList(ResultData.CREATOR);
this.testArrayResultData = in.createTypedArray(ResultData.CREATOR);
this.testArrayInt = in.createIntArray();
this.testArrayInteger = (Integer[]) in.readArray(Integer[].class.getClassLoader());
}
示例6: ShareElementInfo
import android.os.Parcel; //导入方法依赖的package包/类
protected ShareElementInfo(Parcel in) {
mOriginalLocation = in.createIntArray();
mTargetLocation = in.createIntArray();
mOriginalValues = in.createFloatArray();
mTargetValues = in.createFloatArray();
mOriginalWidth = in.readInt();
mOriginalHeight = in.readInt();
mTargetWidth = in.readInt();
mTargetHeight = in.readInt();
mOriginalViewWidth = in.readInt();
mOriginalViewHeight = in.readInt();
mTargetViewWidth = in.readInt();
mTargetViewHeight = in.readInt();
mCenterOffsetX = in.readInt();
mCenterOffsetY = in.readInt();
mScaleX = in.readFloat();
mScaleY = in.readFloat();
mPivotX = in.readFloat();
mPivotY = in.readFloat();
}
示例7: BaseOption
import android.os.Parcel; //导入方法依赖的package包/类
protected BaseOption(Parcel in) {
optionType = in.readInt();
key = in.readInt();
active = in.readByte() != 0;
title = in.readInt();
parentDependencyKey = in.readInt();
childDependencies = in.createIntArray();
}
示例8: BackStackState
import android.os.Parcel; //导入方法依赖的package包/类
public BackStackState(Parcel in) {
this.mOps = in.createIntArray();
this.mTransition = in.readInt();
this.mTransitionStyle = in.readInt();
this.mName = in.readString();
this.mIndex = in.readInt();
this.mBreadCrumbTitleRes = in.readInt();
this.mBreadCrumbTitleText = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
this.mBreadCrumbShortTitleRes = in.readInt();
this.mBreadCrumbShortTitleText = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
this.mSharedElementSourceNames = in.createStringArrayList();
this.mSharedElementTargetNames = in.createStringArrayList();
}
示例9: FontInfo
import android.os.Parcel; //导入方法依赖的package包/类
private FontInfo(Parcel in) {
this.name = in.readString();
this.variant = in.readString();
this.language = in.createStringArray();
this.ttc_index = in.createIntArray();
this.size = in.readString();
this.preview_text = in.createStringArray();
this.url_prefix = in.readString();
this.style = in.createTypedArray(Style.CREATOR);
}
示例10: Stream
import android.os.Parcel; //导入方法依赖的package包/类
protected Stream(Parcel in) {
slug = in.readString();
display = in.readString();
type = in.readString();
isTranslated = in.readByte() != 0;
videoSize = in.createIntArray();
int mapSize = in.readInt();
urls = new HashMap<>();
for(int i = 0; i< mapSize; i++){
urls.put(in.readString(),in.readParcelable(StreamUrl.class.getClassLoader()));
}
}
示例11: 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;
}
示例12: Spinner
import android.os.Parcel; //导入方法依赖的package包/类
protected Spinner(Parcel in) {
super(in);
itemArrayRes = in.readInt();
itemStringResArray = in.createIntArray();
items = in.createStringArray();
text = in.readString();
textResourceId = in.readInt();
placeholder = in.readString();
placeholderResourceId = in.readInt();
position = in.readInt();
}
示例13: Achievement
import android.os.Parcel; //导入方法依赖的package包/类
private Achievement(Parcel in) {
String[] strings = in.createStringArray();
int[] ints = in.createIntArray();
description = strings[0];
heading = strings[1];
shareText = strings[2];
iconLockedID = ints[0];
iconUnlockedID = ints[1];
criterion = in.readParcelable(Criterion.class.getClassLoader());
}
示例14: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
private SavedState(@NonNull Parcel in) {
super(in);
this.mItemsTextsResIds = in.createIntArray();
mSelectedItemPosition = in.readInt();
mItemsIconsResIds = in.createIntArray();
}
示例15: FragmentManagerState
import android.os.Parcel; //导入方法依赖的package包/类
public FragmentManagerState(Parcel in) {
this.mActive = (FragmentState[]) in.createTypedArray(FragmentState.CREATOR);
this.mAdded = in.createIntArray();
this.mBackStack = (BackStackState[]) in.createTypedArray(BackStackState.CREATOR);
}