當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。