Java Code Examples for android.os.Parcel#readParcelable()
The following examples show how to use
android.os.Parcel#readParcelable() .
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: SrcDstPlain.java From edslite with GNU General Public License v2.0 | 6 votes |
public SrcDstPlain createFromParcel(Parcel in) { SrcDstPlain res = new SrcDstPlain(); try { LocationsManager lm = LocationsManagerBase.getLocationsManager(null, false); int size = in.readInt(); for(int i=0;i<size;i++) { Uri u = in.readParcelable(getClass().getClassLoader()); Location srcLoc = lm!=null ? lm.getLocation(u) : null; u = in.readParcelable(getClass().getClassLoader()); Location dstLoc = Uri.EMPTY.equals(u) ? null : lm != null ? lm.getLocation(u) : null; if(srcLoc != null) res.add(srcLoc, dstLoc); } } catch(Exception e) { Logger.log(e); } return res; }
Example 2
Source File: Milestone.java From OpenHub with GNU General Public License v3.0 | 6 votes |
protected Milestone(Parcel in) { this.id = in.readLong(); this.number = in.readInt(); this.title = in.readString(); this.description = in.readString(); this.creator = in.readParcelable(User.class.getClassLoader()); this.openIssues = in.readInt(); this.closedIssues = in.readInt(); int tmpState = in.readInt(); this.state = tmpState == -1 ? null : State.values()[tmpState]; 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 tmpDueOn = in.readLong(); this.dueOn = tmpDueOn == -1 ? null : new Date(tmpDueOn); long tmpClosedAt = in.readLong(); this.closedAt = tmpClosedAt == -1 ? null : new Date(tmpClosedAt); }
Example 3
Source File: SendRequest.java From mytracks with Apache License 2.0 | 6 votes |
private SendRequest(Parcel in) { trackId = in.readLong(); sendDrive = in.readByte() == 1; sendMaps = in.readByte() == 1; sendFusionTables = in.readByte() == 1; sendSpreadsheets = in.readByte() == 1; driveSync = in.readByte() == 1; driveSharePublic = in.readByte() == 1; driveShareEmails = in.readString(); account = in.readParcelable(null); driveSuccess = in.readByte() == 1; mapsSuccess = in.readByte() == 1; fusionTablesSuccess = in.readByte() == 1; spreadsheetsSuccess = in.readByte() == 1; shareUrl = in.readString(); }
Example 4
Source File: EssFile.java From FilePicker with MIT License | 5 votes |
protected EssFile(Parcel in) { mFilePath = in.readString(); mimeType = in.readString(); childFolderCount = in.readString(); childFileCount = in.readString(); isChecked = in.readByte() != 0; isExits = in.readByte() != 0; isDirectory = in.readByte() != 0; isFile = in.readByte() != 0; mFileName = in.readString(); uri = in.readParcelable(Uri.class.getClassLoader()); itemType = in.readInt(); }
Example 5
Source File: AppUpdateStatusManager.java From fdroidclient with GNU General Public License v3.0 | 5 votes |
protected AppUpdateStatus(Parcel in) { app = in.readParcelable(getClass().getClassLoader()); apk = in.readParcelable(getClass().getClassLoader()); intent = in.readParcelable(getClass().getClassLoader()); status = (Status) in.readSerializable(); progressCurrent = in.readLong(); progressMax = in.readLong(); errorText = in.readString(); }
Example 6
Source File: ResourceGroup.java From android_maplib with GNU Lesser General Public License v3.0 | 5 votes |
private ResourceGroup(Parcel in) { super(in); mChildrenLoaded = in.readByte() == 1; mChildren = new ArrayList<>(); int count = in.readInt(); for (int i = 0; i < count; i++) { int type = in.readInt(); switch (type) { case Connection.NGWResourceTypeResourceGroup: ResourceGroup resourceGroup = in.readParcelable(ResourceGroup.class.getClassLoader()); resourceGroup.setParent(this); mChildren.add(resourceGroup); break; case Connection.NGWResourceTypePostgisLayer: if (mConnection.getNgwVersionMajor() < Constants.NGW_v3) break; case Connection.NGWResourceTypeRasterLayer: case Connection.NGWResourceTypeVectorLayer: case Connection.NGWResourceTypeWMSClient: LayerWithStyles layer = in.readParcelable(LayerWithStyles.class.getClassLoader()); layer.setParent(this); mChildren.add(layer); break; case Connection.NGWResourceTypeLookupTable: ResourceWithoutChildren resourceWoChildren = in.readParcelable(ResourceWithoutChildren.class.getClassLoader()); resourceWoChildren.setParent(this); mChildren.add(resourceWoChildren); case Connection.NGWResourceTypeWebMap: WebMap webMap = in.readParcelable(WebMap.class.getClassLoader()); webMap.setParent(this); mChildren.add(webMap); break; } } }
Example 7
Source File: VerticalViewPager.java From ankihelper with GNU General Public License v3.0 | 5 votes |
SavedState(Parcel in, ClassLoader loader) { super(in); if (loader == null) { loader = getClass().getClassLoader(); } position = in.readInt(); adapterState = in.readParcelable(loader); this.loader = loader; }
Example 8
Source File: Snack.java From SnackBar with Apache License 2.0 | 5 votes |
Snack(Parcel p) { mMessage = p.readString(); mActionMessage = p.readString(); mActionIcon = p.readInt(); mToken = p.readParcelable(p.getClass().getClassLoader()); mDuration = (short) p.readInt(); mBtnTextColor = p.readParcelable(p.getClass().getClassLoader()); mBackgroundColor = p.readParcelable(p.getClass().getClassLoader()); mHeight = p.readInt(); mTypeface = (Typeface) p.readValue(p.getClass().getClassLoader()); }
Example 9
Source File: Dialog.java From material with Apache License 2.0 | 5 votes |
protected Builder(Parcel in) { mStyleId = in.readInt(); mContentViewId = in.readInt(); mTitle = (CharSequence)in.readParcelable(null); mPositive = (CharSequence)in.readParcelable(null); mNegative = (CharSequence)in.readParcelable(null); mNeutral = (CharSequence)in.readParcelable(null); onReadFromParcel(in); }
Example 10
Source File: GuidanceManeuverData.java From msdkui-android with Apache License 2.0 | 5 votes |
GuidanceManeuverData(Parcel in) { mIconId = in.readInt(); if (in.readByte() == 0) { mDistance = null; } else { mDistance = in.readLong(); } mInfo1 = in.readString(); mInfo2 = in.readString(); mNextRoadIcon = in.readParcelable(Bitmap.class.getClassLoader()); }
Example 11
Source File: EDSLocationFormatterBase.java From edslite with GNU General Public License v2.0 | 4 votes |
protected EDSLocationFormatterBase(Parcel in) { _disableDefaultSettings = in.readByte() != 0; _password = in.readParcelable(ClassLoader.getSystemClassLoader()); }
Example 12
Source File: SavedCardDrawableFragmentItem.java From px-android with MIT License | 4 votes |
protected SavedCardDrawableFragmentItem(final Parcel in) { super(in); paymentMethodId = in.readString(); card = in.readParcelable(CardDrawerConfiguration.class.getClassLoader()); }
Example 13
Source File: ConfigNetworkTransmitStatus.java From Android-nRF-Mesh-Library with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public ConfigNetworkTransmitStatus createFromParcel(Parcel in) { final AccessMessage message = in.readParcelable(AccessMessage.class.getClassLoader()); //noinspection ConstantConditions return new ConfigNetworkTransmitStatus(message); }
Example 14
Source File: AlertEvaluationCondition.java From hawkular-android-client with Apache License 2.0 | 4 votes |
private AlertEvaluationCondition(Parcel parcel) { this.threshold = parcel.readDouble(); this.type = parcel.readParcelable(AlertType.class.getClassLoader()); }
Example 15
Source File: StopPoint.java From GoogleDirectionLibrary with Apache License 2.0 | 4 votes |
protected StopPoint(Parcel in) { location = in.readParcelable(Coordination.class.getClassLoader()); name = in.readString(); }
Example 16
Source File: Bound.java From GoogleDirectionLibrary with Apache License 2.0 | 4 votes |
protected Bound(Parcel in) { northeast = in.readParcelable(Coordination.class.getClassLoader()); southwest = in.readParcelable(Coordination.class.getClassLoader()); }
Example 17
Source File: Metadata.java From Loop with Apache License 2.0 | 4 votes |
protected Metadata(Parcel in) { this.connections = in.readParcelable(Connections.class.getClassLoader()); this.interactions = in.readParcelable(Interactions.class.getClassLoader()); }
Example 18
Source File: WeiboVideoMBlog.java From MicroReader with MIT License | 4 votes |
protected WeiboVideoMBlog(Parcel in) { createTime = in.readString(); text = in.readString(); mPageInfo = in.readParcelable(WeiboVideoPageInfo.class.getClassLoader()); mBlog = in.readParcelable(WeiboVideoMBlog.class.getClassLoader()); }
Example 19
Source File: SavedState.java From dhis2-android-capture-app with BSD 3-Clause "New" or "Revised" License | 4 votes |
private SavedState(Parcel in) { super(in); preferences = in.readParcelable(Preferences.class.getClassLoader()); }
Example 20
Source File: ScanFilterCompat.java From AndroidBleManager with Apache License 2.0 | 4 votes |
@Override public ScanFilterCompat createFromParcel(Parcel in) { Builder builder = new Builder(); if (in.readInt() == 1) { builder.setDeviceName(in.readString()); } if (in.readInt() == 1) { builder.setDeviceAddress(in.readString()); } if (in.readInt() == 1) { ParcelUuid uuid = in.readParcelable(ParcelUuid.class.getClassLoader()); builder.setServiceUuid(uuid); if (in.readInt() == 1) { ParcelUuid uuidMask = in.readParcelable( ParcelUuid.class.getClassLoader()); builder.setServiceUuid(uuid, uuidMask); } } if (in.readInt() == 1) { ParcelUuid servcieDataUuid = in.readParcelable(ParcelUuid.class.getClassLoader()); if (in.readInt() == 1) { int serviceDataLength = in.readInt(); byte[] serviceData = new byte[serviceDataLength]; in.readByteArray(serviceData); if (in.readInt() == 0) { builder.setServiceData(servcieDataUuid, serviceData); } else { int serviceDataMaskLength = in.readInt(); byte[] serviceDataMask = new byte[serviceDataMaskLength]; in.readByteArray(serviceDataMask); builder.setServiceData( servcieDataUuid, serviceData, serviceDataMask); } } } int manufacturerId = in.readInt(); if (in.readInt() == 1) { int manufacturerDataLength = in.readInt(); byte[] manufacturerData = new byte[manufacturerDataLength]; in.readByteArray(manufacturerData); if (in.readInt() == 0) { builder.setManufacturerData(manufacturerId, manufacturerData); } else { int manufacturerDataMaskLength = in.readInt(); byte[] manufacturerDataMask = new byte[manufacturerDataMaskLength]; in.readByteArray(manufacturerDataMask); builder.setManufacturerData(manufacturerId, manufacturerData, manufacturerDataMask); } } return builder.build(); }