Java Code Examples for android.os.Parcel#readBooleanArray()
The following examples show how to use
android.os.Parcel#readBooleanArray() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SparseBooleanArrayParcelable.java From android-styled-dialogs with Apache License 2.0 | 6 votes |
@Override public SparseBooleanArrayParcelable createFromParcel(Parcel source) { SparseBooleanArrayParcelable read = new SparseBooleanArrayParcelable(); int size = source.readInt(); int[] keys = new int[size]; boolean[] values = new boolean[size]; source.readIntArray(keys); source.readBooleanArray(values); for (int i = 0; i < size; i++) { read.put(keys[i], values[i]); } return read; }
Example 2
Source File: AppItem.java From openapk with GNU General Public License v3.0 | 6 votes |
public AppItem(Parcel parcel) { icon = parcel.readParcelable(getClass().getClassLoader()); packageLabel = parcel.readString(); packageName = parcel.readString(); versionName = parcel.readString(); versionCode = parcel.readString(); data = parcel.readString(); source = parcel.readString(); install = parcel.readString(); update = parcel.readString(); boolean[] flags = new boolean[4]; parcel.readBooleanArray(flags); system = flags[0]; disable = flags[1]; hide = flags[2]; favorite = flags[3]; }
Example 3
Source File: ParcelableSparseBooleanArray.java From material-components-android with Apache License 2.0 | 6 votes |
@NonNull @Override public ParcelableSparseBooleanArray createFromParcel(@NonNull Parcel source) { int size = source.readInt(); ParcelableSparseBooleanArray read = new ParcelableSparseBooleanArray(size); int[] keys = new int[size]; boolean[] values = new boolean[size]; source.readIntArray(keys); source.readBooleanArray(values); for (int i = 0; i < size; i++) { read.put(keys[i], values[i]); } return read; }
Example 4
Source File: SearchWithRecipeRecord.java From android-recipes-app with Apache License 2.0 | 6 votes |
private SearchWithRecipeRecord(Parcel in) { super(SearchWithRecipe.CONTENT_URI); setId(in.readLong()); mName = in.readString(); mImage = in.readString(); mPrepTime = in.readLong(); mCookTime = in.readLong(); mCategory = in.readString(); mString = in.readString(); mFavorite = (in.readInt() > 0); mTotalTime = in.readLong(); boolean[] dirtyFlags = new boolean[8]; in.readBooleanArray(dirtyFlags); mNameDirty = dirtyFlags[0]; mImageDirty = dirtyFlags[1]; mPrepTimeDirty = dirtyFlags[2]; mCookTimeDirty = dirtyFlags[3]; mCategoryDirty = dirtyFlags[4]; mStringDirty = dirtyFlags[5]; mFavoriteDirty = dirtyFlags[6]; mTotalTimeDirty = dirtyFlags[7]; }
Example 5
Source File: SparseBooleanArrayParcelable.java From Expense-Tracker-App with MIT License | 6 votes |
@Override public SparseBooleanArrayParcelable createFromParcel(Parcel source) { SparseBooleanArrayParcelable read = new SparseBooleanArrayParcelable(); int size = source.readInt(); int[] keys = new int[size]; boolean[] values = new boolean[size]; source.readIntArray(keys); source.readBooleanArray(values); for (int i = 0; i < size; i++) { read.put(keys[i], values[i]); } return read; }
Example 6
Source File: AccountBean.java From iBeebo with GNU General Public License v3.0 | 6 votes |
public AccountBean createFromParcel(Parcel in) { AccountBean accountBean = new AccountBean(); accountBean.access_token = in.readString(); accountBean.expires_time = in.readLong(); accountBean.navigationPosition = in.readInt(); // uname cookie accountBean.uname = in.readString(); accountBean.pwd = in.readString(); accountBean.cookie = in.readString(); accountBean.access_token_hack = in.readString(); accountBean.expires_time_hack = in.readLong(); accountBean.gsid = in.readString(); // boolean[] booleans = new boolean[1]; in.readBooleanArray(booleans); accountBean.black_magic = booleans[0]; accountBean.info = in.readParcelable(UserBean.class .getClassLoader()); return accountBean; }
Example 7
Source File: IngredientsRecord.java From android-recipes-app with Apache License 2.0 | 6 votes |
private IngredientsRecord(Parcel in) { super(Ingredients.CONTENT_URI); setId(in.readLong()); mRecipeId = in.readLong(); mIngredient = in.readString(); mQuantity = in.readLong(); mUnits = in.readString(); boolean[] dirtyFlags = new boolean[4]; in.readBooleanArray(dirtyFlags); mRecipeIdDirty = dirtyFlags[0]; mIngredientDirty = dirtyFlags[1]; mQuantityDirty = dirtyFlags[2]; mUnitsDirty = dirtyFlags[3]; }
Example 8
Source File: UserBean.java From iBeebo with GNU General Public License v3.0 | 5 votes |
public UserBean createFromParcel(Parcel in) { UserBean userBean = new UserBean(); userBean.id = in.readString(); userBean.screen_name = in.readString(); userBean.name = in.readString(); userBean.province = in.readString(); userBean.city = in.readString(); userBean.location = in.readString(); userBean.description = in.readString(); userBean.url = in.readString(); userBean.profile_image_url = in.readString(); userBean.cover_image = in.readString(); userBean.domain = in.readString(); userBean.gender = in.readString(); userBean.statuses_count = in.readString(); userBean.favourites_count = in.readString(); userBean.created_at = in.readString(); userBean.allow_all_act_msg = in.readString(); userBean.remark = in.readString(); userBean.geo_enabled = in.readString(); userBean.allow_all_comment = in.readString(); userBean.avatar_large = in.readString(); userBean.verified_reason = in.readString(); userBean.verified_type = in.readInt(); userBean.online_status = in.readString(); userBean.bi_followers_count = in.readString(); userBean.followers_count = in.readString(); userBean.friends_count = in.readString(); boolean[] booleans = new boolean[3]; in.readBooleanArray(booleans); userBean.following = booleans[0]; userBean.follow_me = booleans[1]; userBean.verified = booleans[2]; return userBean; }
Example 9
Source File: MessageModel.java From BlackLight with GNU General Public License v3.0 | 5 votes |
@Override public MessageModel createFromParcel(Parcel in) { MessageModel ret = new MessageModel(); ret.created_at = in.readString(); ret.id = in.readLong(); ret.mid = in.readLong(); ret.idstr = in.readString(); ret.text = in.readString(); ret.source = in.readString(); boolean[] array = new boolean[2]; in.readBooleanArray(array); ret.favorited = array[0]; ret.truncated = array[1]; ret.in_reply_to_status_id = in.readString(); ret.in_reply_to_user_id = in.readString(); ret.in_reply_to_screen_name = in.readString(); ret.thumbnail_pic = in.readString(); ret.bmiddle_pic = in.readString(); ret.original_pic = in.readString(); ret.geo = in.readParcelable(GeoModel.class.getClassLoader()); ret.user = in.readParcelable(UserModel.class.getClassLoader()); ret.retweeted_status = in.readParcelable(MessageModel.class.getClassLoader()); ret.reposts_count = in.readInt(); ret.comments_count = in.readInt(); ret.attitudes_count = in.readInt(); in.readTypedList(ret.pic_urls, PictureUrl.CREATOR); return ret; }
Example 10
Source File: BooleanArrayParcelConverter.java From parceler with Apache License 2.0 | 5 votes |
@Override public boolean[] fromParcel(Parcel parcel) { boolean[] array; int size = parcel.readInt(); if (size == NULL) { array = null; } else { array = new boolean[size]; parcel.readBooleanArray(array); } return array; }
Example 11
Source File: TopTipsView.java From iBeebo with GNU General Public License v3.0 | 5 votes |
@SuppressWarnings("unchecked") private SavedState(Parcel in) { super(in); Bundle bundle = in.readBundle(); this.ids = (TreeSet<Long>) bundle.getSerializable("ids"); this.type = (Type) bundle.getSerializable("type"); boolean[] disappearArray = new boolean[2]; in.readBooleanArray(disappearArray); this.disappear = disappearArray[0]; this.visible = disappearArray[1]; }
Example 12
Source File: PinInfo.java From google-authenticator-android with Apache License 2.0 | 5 votes |
public PinInfo(Parcel pc) { // Using readValue instead of readString since mPin can be null. mPin = (String) pc.readValue(PinInfo.class.getClassLoader()); mIndex = (AccountIndex) pc.readSerializable(); boolean[] booleanArray = new boolean[2]; pc.readBooleanArray(booleanArray); mIsHotp = booleanArray[0]; mHotpCodeGenerationAllowed = booleanArray[1]; }
Example 13
Source File: AnimationRect.java From iBeebo with GNU General Public License v3.0 | 5 votes |
public AnimationRect createFromParcel(Parcel in) { AnimationRect rect = new AnimationRect(); rect.scaledBitmapRect = in.readParcelable(Rect.class.getClassLoader()); rect.imageViewEntireRect = in.readParcelable(Rect.class.getClassLoader()); rect.imageViewVisibleRect = in.readParcelable(Rect.class.getClassLoader()); rect.type = in.readInt(); boolean[] booleans = new boolean[1]; in.readBooleanArray(booleans); rect.isTotalVisible = booleans[0]; boolean[] isTotalInvisibleBooleans = new boolean[1]; in.readBooleanArray(isTotalInvisibleBooleans); rect.isTotalInvisible = isTotalInvisibleBooleans[0]; boolean[] isScreenPortraitArray = new boolean[1]; in.readBooleanArray(isScreenPortraitArray); rect.isScreenPortrait = isScreenPortraitArray[0]; rect.thumbnailWidthHeightRatio = in.readFloat(); rect.thumbnailWidth = in.readInt(); rect.thumbnailHeight = in.readInt(); rect.widgetWidth = in.readInt(); rect.widgetHeight = in.readInt(); rect.clipByParentRectTop = in.readFloat(); rect.clipByParentRectBottom = in.readFloat(); rect.clipByParentRectLeft = in.readFloat(); rect.clipByParentRectRight = in.readFloat(); return rect; }
Example 14
Source File: RecipesRecord.java From android-recipes-app with Apache License 2.0 | 5 votes |
private RecipesRecord(Parcel in) { super(Recipes.CONTENT_URI); setId(in.readLong()); mSource = in.readString(); mSourceName = in.readString(); mName = in.readString(); mPrepTime = in.readLong(); mCookTime = in.readLong(); mTotalTime = in.readLong(); mServes = in.readLong(); mDirections = in.readString(); mCategory = in.readString(); mImage = in.readString(); mSummary = in.readString(); mFavorite = (in.readInt() > 0); mRecipeId = in.readString(); boolean[] dirtyFlags = new boolean[13]; in.readBooleanArray(dirtyFlags); mSourceDirty = dirtyFlags[0]; mSourceNameDirty = dirtyFlags[1]; mNameDirty = dirtyFlags[2]; mPrepTimeDirty = dirtyFlags[3]; mCookTimeDirty = dirtyFlags[4]; mTotalTimeDirty = dirtyFlags[5]; mServesDirty = dirtyFlags[6]; mDirectionsDirty = dirtyFlags[7]; mCategoryDirty = dirtyFlags[8]; mImageDirty = dirtyFlags[9]; mSummaryDirty = dirtyFlags[10]; mFavoriteDirty = dirtyFlags[11]; mRecipeIdDirty = dirtyFlags[12]; }
Example 15
Source File: LoopBarView.java From LoopBar with MIT License | 5 votes |
@SuppressWarnings("unused") private SavedState(Parcel parcel) { super(parcel); mCurrentItemPosition = parcel.readInt(); @GravityAttr int gravity = parcel.readInt(); mSelectionGravity = gravity; @ScrollAttr int scrollMode = parcel.readInt(); mScrollMode = scrollMode; boolean[] booleanValues = new boolean[1]; parcel.readBooleanArray(booleanValues); mIsInfinite = booleanValues[0]; mAdapterSize = parcel.readInt(); }
Example 16
Source File: MarqueeTextView.java From BigApp_Discuz_Android with Apache License 2.0 | 5 votes |
private SavedState(Parcel in) { super(in); boolean[] b = null; in.readBooleanArray(b); if (b != null && b.length > 0) isStarting = b[0]; step = in.readFloat(); }
Example 17
Source File: AppInfo.java From AsteroidOSSync with GNU General Public License v3.0 | 5 votes |
private AppInfo(Parcel in) { label = in.readString(); packageName = in.readString(); boolean[] bools = new boolean[4]; in.readBooleanArray(bools); system = bools[0]; installed = bools[1]; checked = bools[2]; icon = in.readParcelable(getClass().getClassLoader()); }
Example 18
Source File: DownloadDescriptor.java From edx-app-android with Apache License 2.0 | 4 votes |
private DownloadDescriptor(Parcel in) { this.url = in.readString(); boolean[] forceDownload = new boolean[1]; in.readBooleanArray(forceDownload); this.forceDownload = forceDownload != null && forceDownload.length > 0 && forceDownload[0]; }
Example 19
Source File: FilterSpec.java From Leaderboards with Apache License 2.0 | 4 votes |
public FilterSpec(Parcel pc){ pc.readBooleanArray(factions); pc.readBooleanArray(classes); pc.readBooleanArray(races); }
Example 20
Source File: MessageBean.java From iBeebo with GNU General Public License v3.0 | 4 votes |
public MessageBean createFromParcel(Parcel in) { MessageBean messageBean = new MessageBean(); messageBean.created_at = in.readString(); messageBean.id = in.readLong(); messageBean.idstr = in.readString(); messageBean.text = in.readString(); messageBean.source = in.readString(); boolean[] booleans = new boolean[1]; in.readBooleanArray(booleans); messageBean.favorited = booleans[0]; messageBean.truncated = in.readString(); messageBean.in_reply_to_status_id = in.readString(); messageBean.in_reply_to_user_id = in.readString(); messageBean.in_reply_to_screen_name = in.readString(); messageBean.mid = in.readString(); messageBean.reposts_count = in.readInt(); messageBean.comments_count = in.readInt(); messageBean.thumbnail_pic = in.readString(); messageBean.bmiddle_pic = in.readString(); messageBean.original_pic = in.readString(); messageBean.sourceString = in.readString(); messageBean.mills = in.readLong(); messageBean.retweeted_status = in.readParcelable(MessageBean.class.getClassLoader()); messageBean.user = in.readParcelable(UserBean.class.getClassLoader()); messageBean.geo = in.readParcelable(GeoBean.class.getClassLoader()); messageBean.pic_urls = new ArrayList<PicUrls>(); in.readTypedList(messageBean.pic_urls, PicUrls.CREATOR); messageBean.pic_ids = new ArrayList<String>(); in.readStringList(messageBean.pic_ids); messageBean.pic_infos = new ArrayList<HotWeiboPicInfos>(); in.readTypedList(messageBean.pic_infos, HotWeiboPicInfos.CREATOR); return messageBean; }