当前位置: 首页>>代码示例>>Java>>正文


Java Parcel.createIntArray方法代码示例

本文整理汇总了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;
}
 
开发者ID:Gericop,项目名称:DateTimePicker,代码行数:22,代码来源:Utils.java

示例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;
}
 
开发者ID:Loofer,项目名称:Watermark,代码行数:27,代码来源:Configuration.java

示例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();
}
 
开发者ID:eltos,项目名称:SimpleDialogFragments,代码行数:19,代码来源:Input.java

示例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());
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:19,代码来源:StreamInfo.java

示例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());
}
 
开发者ID:LightSun,项目名称:data-mediator,代码行数:22,代码来源:HistoryData.java

示例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();
}
 
开发者ID:idisfkj,项目名称:AndroidShareElement,代码行数:21,代码来源:ShareElementInfo.java

示例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();
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:9,代码来源:BaseOption.java

示例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();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:BackStackState.java

示例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);
}
 
开发者ID:RikkaApps,项目名称:FontProvider,代码行数:11,代码来源:FontInfo.java

示例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()));
	}
}
 
开发者ID:NiciDieNase,项目名称:chaosflix,代码行数:13,代码来源:Stream.java

示例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;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:16,代码来源:TagFilterHolder.java

示例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();
}
 
开发者ID:eltos,项目名称:SimpleDialogFragments,代码行数:12,代码来源:Spinner.java

示例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());
}
 
开发者ID:mr-kojo,项目名称:Veggietizer,代码行数:12,代码来源:Achievement.java

示例14: SavedState

import android.os.Parcel; //导入方法依赖的package包/类
private SavedState(@NonNull Parcel in) {
    super(in);
    this.mItemsTextsResIds = in.createIntArray();
    mSelectedItemPosition = in.readInt();
    mItemsIconsResIds = in.createIntArray();
}
 
开发者ID:AndroidDeveloperLB,项目名称:FullSizePopupSpinner,代码行数:7,代码来源:FullSizePopupSpinner.java

示例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);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:6,代码来源:FragmentManagerState.java


注:本文中的android.os.Parcel.createIntArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。