當前位置: 首頁>>代碼示例>>Java>>正文


Java Parcel.readValue方法代碼示例

本文整理匯總了Java中android.os.Parcel.readValue方法的典型用法代碼示例。如果您正苦於以下問題:Java Parcel.readValue方法的具體用法?Java Parcel.readValue怎麽用?Java Parcel.readValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Parcel的用法示例。


在下文中一共展示了Parcel.readValue方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AurSearchResult

import android.os.Parcel; //導入方法依賴的package包/類
private AurSearchResult(Parcel in) {
    this.iD = (Integer) in.readValue(Integer.class.getClassLoader());
    this.name = in.readString();
    this.packageBaseID = (Integer) in.readValue(Integer.class.getClassLoader());
    this.packageBase = in.readString();
    this.version = in.readString();
    this.description = in.readString();
    this.uRL = in.readString();
    this.numVotes = (Integer) in.readValue(Integer.class.getClassLoader());
    this.popularity = (Double) in.readValue(Double.class.getClassLoader());
    this.outOfDate = in.readString();
    this.maintainer = in.readString();
    this.firstSubmitted = (Integer) in.readValue(Integer.class.getClassLoader());
    this.lastModified = (Integer) in.readValue(Integer.class.getClassLoader());
    this.uRLPath = in.readString();
}
 
開發者ID:rascarlo,項目名稱:AURdroid,代碼行數:17,代碼來源:AurSearchResult.java

示例2: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
    "unchecked"
})
public TvResult createFromParcel(Parcel in) {
    TvResult instance = new TvResult();
    instance.posterPath = ((String) in.readValue((String.class.getClassLoader())));
    instance.popularity = ((Double) in.readValue((Double.class.getClassLoader())));
    instance.id = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.backdropPath = ((String) in.readValue((String.class.getClassLoader())));
    instance.voteAverage = ((Double) in.readValue((Double.class.getClassLoader())));
    instance.overview = ((String) in.readValue((String.class.getClassLoader())));
    instance.firstAirDate = ((String) in.readValue((String.class.getClassLoader())));
    in.readList(instance.originCountry, (String.class.getClassLoader()));
    in.readList(instance.genreIds, (Integer.class.getClassLoader()));
    instance.originalLanguage = ((String) in.readValue((String.class.getClassLoader())));
    instance.voteCount = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.name = ((String) in.readValue((String.class.getClassLoader())));
    instance.originalName = ((String) in.readValue((String.class.getClassLoader())));
    return instance;
}
 
開發者ID:prakh25,項目名稱:MovieApp,代碼行數:21,代碼來源:TvResult.java

示例3: onBind

import android.os.Parcel; //導入方法依賴的package包/類
@Override public @Nullable IBinder onBind(final Intent intent) {
	return new Binder() {
		@Override protected boolean onTransact(final int code, final Parcel data, final Parcel reply, final int flags) throws RemoteException {
			try {
				final Class<?> clazz = Class.forName(data.readString());
				final Constructor<?> constructor = clazz.getDeclaredConstructors()[0];
				constructor.setAccessible(true);
				final Class<?>[] parameter_types = constructor.getParameterTypes();
				final Object[] args = new Object[parameter_types.length];
				for (int i = 0; i < args.length; i++) {
					if (parameter_types[i] == Context.class) args[i] = TestService.this;
					else if (parameter_types[i] == Application.class) args[i] = getApplication();
					else args[i] = data.readValue(getClassLoader());
				}
				final Procedure procedure = (Procedure) constructor.newInstance(args);
				procedure.run(TestService.this);
				reply.writeValue(null);
			} catch (final Throwable t) {
				reply.writeValue(t);
			}
			return true;
		}
	};
}
 
開發者ID:oasisfeng,項目名稱:condom,代碼行數:25,代碼來源:TestService.java

示例4: DeviceState

import android.os.Parcel; //導入方法依賴的package包/類
private DeviceState(Parcel in) {
    deviceId = in.readString();
    name = (String) in.readValue(String.class.getClassLoader());
    isConnected = (Boolean) in.readValue(Boolean.class.getClassLoader());
    functions = new HashSet<>(Parcelables.readStringList(in));
    variables = Parcelables.readSerializableMap(in);
    version = (String) in.readValue(String.class.getClassLoader());
    deviceType = ParticleDevice.ParticleDeviceType.valueOf((String) in.readValue(String.class.getClassLoader()));
    platformId = (Integer) in.readValue(Integer.class.getClassLoader());
    productId = (Integer) in.readValue(Integer.class.getClassLoader());
    cellular = (Boolean) in.readValue(Boolean.class.getClassLoader());
    imei = (String) in.readValue(String.class.getClassLoader());
    currentBuild = (String) in.readValue(String.class.getClassLoader());
    defaultBuild = (String) in.readValue(String.class.getClassLoader());
    ipAddress = (String) in.readValue(String.class.getClassLoader());
    lastAppName = (String) in.readValue(String.class.getClassLoader());
    status = (String) in.readValue(String.class.getClassLoader());
    requiresUpdate = (Boolean) in.readValue(Boolean.class.getClassLoader());
    lastHeard = new Date((Long) in.readValue(Long.class.getClassLoader()));
}
 
開發者ID:Datatellit,項目名稱:xlight_android_native,代碼行數:21,代碼來源:DeviceState.java

示例5: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
    "unchecked"
})
public Cast createFromParcel(Parcel in) {
    Cast instance = new Cast();
    instance.adult = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
    instance.character = ((String) in.readValue((String.class.getClassLoader())));
    instance.creditId = ((String) in.readValue((String.class.getClassLoader())));
    instance.id = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.originalTitle = ((String) in.readValue((String.class.getClassLoader())));
    instance.posterPath = ((String) in.readValue((String.class.getClassLoader())));
    instance.releaseDate = ((String) in.readValue((String.class.getClassLoader())));
    instance.title = ((String) in.readValue((String.class.getClassLoader())));
    instance.mediaType = ((String) in.readValue((String.class.getClassLoader())));
    instance.episodeCount = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.firstAirDate = ((String) in.readValue((String.class.getClassLoader())));
    instance.name = ((String) in.readValue((String.class.getClassLoader())));
    instance.originalName = ((String) in.readValue((String.class.getClassLoader())));
    return instance;
}
 
開發者ID:prakh25,項目名稱:MovieApp,代碼行數:21,代碼來源:Cast.java

示例6: MovieOverviewModel

import android.os.Parcel; //導入方法依賴的package包/類
protected MovieOverviewModel(Parcel in) {
    this.id = (Long) in.readValue(Long.class.getClassLoader());
    this.adult = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.backdropPath = in.readString();
    this.budget = (Long) in.readValue(Long.class.getClassLoader());
    this.homepage = in.readString();
    this.imdbId = in.readString();
    this.originalLanguage = in.readString();
    this.originalTitle = in.readString();
    this.overview = in.readString();
    this.popularity = (Double) in.readValue(Double.class.getClassLoader());
    this.posterPath = in.readString();
    this.releaseDate = (Long) in.readValue(Long.class.getClassLoader());
    this.revenue = (Long) in.readValue(Long.class.getClassLoader());
    this.runtime = (Long) in.readValue(Long.class.getClassLoader());
    this.status = in.readString();
    this.tagline = in.readString();
    this.title = in.readString();
    this.video = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.voteAverage = (Double) in.readValue(Double.class.getClassLoader());
    this.voteCount = (Long) in.readValue(Long.class.getClassLoader());
    this.youtubeTrailer = in.readString();
    this.serverTitle = in.readString();
    this.serverId = in.readString();
    this.like = (Boolean) in.readValue(Boolean.class.getClassLoader());
    this.genres = in.createTypedArrayList(GenreModel.CREATOR);
    this.cast = new ArrayList<CastRelationModel>();
    in.readList(this.cast, CastRelationModel.class.getClassLoader());
    this.crew = new ArrayList<CrewRelationModel>();
    in.readList(this.crew, CrewRelationModel.class.getClassLoader());
}
 
開發者ID:tgbMedia,項目名稱:Android-app,代碼行數:32,代碼來源:MovieOverviewModel.java

示例7: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
    "unchecked"
})
public City createFromParcel(Parcel in) {
    City instance = new City();
    instance.id = ((int) in.readValue((int.class.getClassLoader())));
    instance.name = ((String) in.readValue((String.class.getClassLoader())));
    instance.coord = ((Coord) in.readValue((Coord.class.getClassLoader())));
    instance.country = ((String) in.readValue((String.class.getClassLoader())));
    instance.population = ((int) in.readValue((int.class.getClassLoader())));
    return instance;
}
 
開發者ID:aschattney,項目名稱:dagger-test-example,代碼行數:13,代碼來源:City.java

示例8: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
    "unchecked"
})
public Poster createFromParcel(Parcel in) {
    Poster instance = new Poster();
    instance.aspectRatio = ((Double) in.readValue((Double.class.getClassLoader())));
    instance.filePath = ((String) in.readValue((String.class.getClassLoader())));
    instance.height = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.iso6391 = ((String) in.readValue((String.class.getClassLoader())));
    instance.voteAverage = ((Double) in.readValue((Integer.class.getClassLoader())));
    instance.voteCount = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.width = ((Integer) in.readValue((Integer.class.getClassLoader())));
    return instance;
}
 
開發者ID:prakh25,項目名稱:MovieApp,代碼行數:15,代碼來源:Poster.java

示例9: ProvinceBean

import android.os.Parcel; //導入方法依賴的package包/類
protected ProvinceBean(Parcel in) {
  this.id = in.readString();
  this.name = in.readString();
  this.pinYin = in.readString();
  this.gisGcj02Lat = (Double) in.readValue(Double.class.getClassLoader());
  this.gisGcj02Lng = (Double) in.readValue(Double.class.getClassLoader());
  this.gisBd09Lat = (Double) in.readValue(Double.class.getClassLoader());
  this.gisBd09Lng = (Double) in.readValue(Double.class.getClassLoader());
  this.zipcode = in.readString();
  this.cityList = new ArrayList<CityBean>();
  in.readList(this.cityList, CityBean.class.getClassLoader());
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:ProvinceBean.java

示例10: CityBean

import android.os.Parcel; //導入方法依賴的package包/類
protected CityBean(Parcel in) {
    this.id = in.readString();
    this.name = in.readString();
    this.pinYin = in.readString();
    this.gisGcj02Lat = (Double) in.readValue(Double.class.getClassLoader());
    this.gisGcj02Lng = (Double) in.readValue(Double.class.getClassLoader());
    this.gisBd09Lat = (Double) in.readValue(Double.class.getClassLoader());
    this.gisBd09Lng = (Double) in.readValue(Double.class.getClassLoader());
    this.zipcode = in.readString();
    this.cityList = new ArrayList<DistrictBean>();
    in.readList(this.cityList, DistrictBean.class.getClassLoader());
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:CityBean.java

示例11: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
    "unchecked"
})
public Similar createFromParcel(Parcel in) {
    Similar instance = new Similar();
    instance.page = ((Integer) in.readValue((Integer.class.getClassLoader())));
    in.readList(instance.movies, (Result.class.getClassLoader()));
    instance.totalPages = ((Integer) in.readValue((Integer.class.getClassLoader())));
    instance.totalResults = ((Integer) in.readValue((Integer.class.getClassLoader())));
    return instance;
}
 
開發者ID:prakh25,項目名稱:MovieApp,代碼行數:12,代碼來源:Similar.java

示例12: unmarshall

import android.os.Parcel; //導入方法依賴的package包/類
static <T> T unmarshall(byte[] array) {
    Parcel parcel = Parcel.obtain();
    parcel.unmarshall(array, 0, array.length);
    parcel.setDataPosition(0);
    Object value = parcel.readValue(CLASS_LOADER);
    parcel.recycle();
    return (T)value;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:9,代碼來源:ParcelFn.java

示例13: RutoDownloadConfig

import android.os.Parcel; //導入方法依賴的package包/類
protected RutoDownloadConfig(Parcel in) {
    anime = (Anime) in.readValue(Anime.class.getClassLoader());
    video = (Video) in.readValue(Video.class.getClassLoader());
    bufferSize = in.readInt();
    destination = in.readString();
    overwrite = in.readByte() != 0x00;
    timeout = in.readInt();
}
 
開發者ID:RutoTV,項目名稱:9AnimeAndroid,代碼行數:9,代碼來源:RutoDownloadConfig.java

示例14: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
    "unchecked"
})
public PersonSearchResult createFromParcel(Parcel in) {
    PersonSearchResult instance = new PersonSearchResult();
    instance.profilePath = ((String) in.readValue((Object.class.getClassLoader())));
    instance.adult = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
    instance.id = ((Integer) in.readValue((Integer.class.getClassLoader())));
    in.readList(instance.knownFor, (KnownFor.class.getClassLoader()));
    instance.name = ((String) in.readValue((String.class.getClassLoader())));
    instance.popularity = ((Double) in.readValue((Double.class.getClassLoader())));
    return instance;
}
 
開發者ID:prakh25,項目名稱:MovieApp,代碼行數:14,代碼來源:PersonSearchResult.java

示例15: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings({
                          "unchecked"
                  })
public Wind createFromParcel(Parcel in)
{
    Wind instance = new Wind();
    instance.speed = ((Double) in.readValue((Double.class.getClassLoader())));
    instance.deg = ((Double) in.readValue((Double.class.getClassLoader())));
    return instance;
}
 
開發者ID:aschattney,項目名稱:dagger-test-example,代碼行數:11,代碼來源:Wind.java


注:本文中的android.os.Parcel.readValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。