本文整理汇总了Java中android.os.Bundle.putParcelableArrayList方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.putParcelableArrayList方法的具体用法?Java Bundle.putParcelableArrayList怎么用?Java Bundle.putParcelableArrayList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Bundle
的用法示例。
在下文中一共展示了Bundle.putParcelableArrayList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import android.os.Bundle; //导入方法依赖的package包/类
@NonNull
public static DeleteSongsDialog create(ArrayList<Song> songs) {
DeleteSongsDialog dialog = new DeleteSongsDialog();
Bundle args = new Bundle();
args.putParcelableArrayList("songs", songs);
dialog.setArguments(args);
return dialog;
}
示例2: onPostExecute
import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onPostExecute(final ArrayList<Integer> integers) {
ArrayList<listItem> failList = new ArrayList<listItem>();
ArrayList<listItem> successList = new ArrayList<listItem>();
for (listItem e:itemlists){
if (integers.contains(e.ID)) failList.add(e);
else successList.add(e);
}
mAuthTask = null;
//showProgress(false);
Intent intent =new Intent(ConfirmTaskActivity.this,ConfirmFinishedActivity.class);
itemlists = adapter.getItems();
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("successList",successList);
bundle.putParcelableArrayList("failList",failList);
intent.putExtras(bundle);
startActivity(intent);
finish();
}
示例3: onSaveInstanceState
import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
outState.putInt(STATE_TYPE, type);
if (firstPageShots.size() > 0) {
outState.putParcelableArrayList(STATE_FIRST_PAGE_DATA, (ArrayList<? extends Parcelable>) firstPageShots);
}
outState.putString(STATE_NEXT_PAGE_URL, getNextPageUrl());
}
示例4: onSaveInstanceState
import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState( Bundle outState ){
super.onSaveInstanceState( outState );
List<BaseItem> items = cartAdapter.getItems();
outState.putParcelableArrayList( KEY_BEER_ITEM_IN_CART, (ArrayList<? extends Parcelable>) items );
}
示例5: newInstance
import android.os.Bundle; //导入方法依赖的package包/类
public static PeopleFullCreditViewPagerFragment newInstance(@Nullable ArrayList<Cast> castList,
@Nullable ArrayList<Crew> crewList,
Integer viewType) {
Bundle args = new Bundle();
args.putParcelableArrayList(ARG_CAST_LIST, castList);
args.putParcelableArrayList(ARG_CREW_LIST, crewList);
args.putInt(ARG_VIEW_TYPE, viewType);
PeopleFullCreditViewPagerFragment fragment = new PeopleFullCreditViewPagerFragment();
fragment.setArguments(args);
return fragment;
}
示例6: newInstance
import android.os.Bundle; //导入方法依赖的package包/类
public static SportCourseFragment newInstance(ArrayList<CourseItemInfo> data) {
SportCourseFragment instance = new SportCourseFragment();
Bundle bundle = new Bundle();
bundle.putParcelableArrayList(KEY_COURSE_DATA, data);
instance.setArguments(bundle);
return instance;
}
示例7: onSaveInstanceState
import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
//outState.putParcelable(VIEW_PARCABLE, recyclerView.onSaveInstanceState());
outState.putString(MODEL_TYPE, model_type);
if(mData != null && mData.size() < 5) {
outState.putInt(MODEL_PAGE, mPage);
outState.putBoolean(MODEL_LIMIT, isLimit);
outState.putParcelableArrayList(MODEL_CACHE, (ArrayList<? extends Parcelable>) mData);
}
super.onSaveInstanceState(outState);
}
示例8: newInstance
import android.os.Bundle; //导入方法依赖的package包/类
/**
* Usar este constructor para crear una instancia de
* este fragment con parámetros
*
* @param proyectos Parametro 1.
* @return A devuelve una nueva instancia del fragment.
*/
public static FragmentProyectos newInstance(ArrayList<Proyecto> proyectos,boolean filtro) {
FragmentProyectos fragment = new FragmentProyectos();
Bundle args = new Bundle();
args.putParcelableArrayList(ARG_PROYECTOS, proyectos);
args.putBoolean(ARG_FILTRO,filtro);
fragment.setArguments(args);
return fragment;
}
示例9: putParcelableArrayList
import android.os.Bundle; //导入方法依赖的package包/类
public Bundler putParcelableArrayList(@NonNull String key, ArrayList<? extends Parcelable> value) {
Bundle safeBundle = new Bundle();
safeBundle.putParcelableArrayList(key, value);
if (isValidBundleSize(safeBundle)) {
bundle.putParcelableArrayList(key, value);
}
clearBundle(safeBundle);
return this;
}
示例10: buildArgsForFave
import android.os.Bundle; //导入方法依赖的package包/类
public static Bundle buildArgsForFave(int aid, @NonNull ArrayList<Photo> photos, int index) {
Bundle args = new Bundle();
args.putInt(Extra.ACCOUNT_ID, aid);
args.putParcelableArrayList(EXTRA_PHOTOS, photos);
args.putInt(Extra.INDEX, index);
return args;
}
示例11: onHandleIntent
import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onHandleIntent(@Nullable Intent intent) {
Log.v(TAG, "onHandleIntent");
Geocoder geocoder = new Geocoder(this, Locale.getDefault());
String errorMessage = "";
// Get the location passed to this service through an extra.
ArrayList<GitHubUserLocationDataEntry> locationsList = intent.getParcelableArrayListExtra(
LocationConstants.LOCATION_DATA_EXTRA);
ResultReceiver mReceiver = intent.getParcelableExtra(
LocationConstants.RECEIVER);
try {
for (int i = 0; i < locationsList.size(); i++) {
GitHubUserLocationDataEntry entry = locationsList.get(i);
List<Address> addressList = geocoder.getFromLocationName(entry.getLocation(), 1);
if (!addressList.isEmpty()) {
Address address = addressList.get(0);
entry.setLatitude(address.getLatitude());
entry.setLongitude(address.getLongitude());
}
}
} catch (IOException ioException) {
// Catch network or other I/O problems.
errorMessage = getString(R.string.service_not_available);
Log.e(TAG, errorMessage, ioException);
} catch (IllegalArgumentException illegalArgumentException) {
// Catch invalid latitude or longitude values.
errorMessage = getString(R.string.invalid_lat_long_used);
Log.e(TAG, errorMessage, illegalArgumentException);
}
Bundle bundle = new Bundle();
bundle.putParcelableArrayList(LocationConstants.LOCATION_DATA_EXTRA, locationsList);
mReceiver.send(0, bundle);
}
示例12: onSaveInstanceState
import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(KEY_IMAGE_ROTATION, image_rotation);
outState.putInt(KEY_CAMERA, camera_id);
outState.putString(KEY_ACCOUNT_ID, account_id);
outState.putString(KEY_DEVICE_ID, device_id);
outState.putString(KEY_SMART_DATA, smart_data);
outState.putString(KEY_SMART_IMAGE, currentImageUrl);
outState.putParcelableArrayList(KEY_SMART_LABELS, smart_labels);
}
示例13: newInstance
import android.os.Bundle; //导入方法依赖的package包/类
/**
* Usar este constructor para crear una instancia de
* este fragment con parámetros
*
* @param comentarios Parametro 1.
* @return A devuelve una nueva instancia del fragment.
*/
public static FragmentComentarios newInstance(ArrayList<Comentario> comentarios,boolean filtro) {
FragmentComentarios fragment = new FragmentComentarios();
Bundle args = new Bundle();
args.putParcelableArrayList(ARG_COMENTARIOS, comentarios);
args.putBoolean(ARG_FILTRO,filtro);
fragment.setArguments(args);
return fragment;
}
示例14: onSaveInstanceState
import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
if(mInputEditText != null)
outState.putString(MODEL_REPLY_TEXT, mInputEditText.getText().toString());
outState.putBoolean(MODEL_IS_FAVOURITE, mPresentLike);
outState.putInt(MODEL_KEY_PARAM, mModelLookUpKey);
outState.putParcelable(MODEL_OBJ_PARAM, mPassedData);
outState.putParcelableArrayList(MODEL_DATA_COLLECTION, (ArrayList<? extends Parcelable>) mData);
super.onSaveInstanceState(outState);
}
示例15: onSaveInstanceState
import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState(Bundle outState) {
if (mSelectedImages != null) {
outState.putParcelableArrayList(Boxing.EXTRA_SELECTED_MEDIA, mSelectedImages);
}
outState.putString(Boxing.EXTRA_ALBUM_ID, mAlbumId);
super.onSaveInstanceState(outState);
}