当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.putParcelableArrayList方法代码示例

本文整理汇总了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;
}
 
开发者ID:aliumujib,项目名称:Orin,代码行数:9,代码来源:DeleteSongsDialog.java

示例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();
}
 
开发者ID:Luodian,项目名称:Shared-Route,代码行数:20,代码来源:ConfirmTaskActivity.java

示例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());
}
 
开发者ID:gejiaheng,项目名称:Protein,代码行数:9,代码来源:ShotListPresenter.java

示例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 );
}
 
开发者ID:TheKhaeng,项目名称:nongbeer-mvp-android-demo,代码行数:7,代码来源:MainActivity.java

示例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;
}
 
开发者ID:prakh25,项目名称:MovieApp,代码行数:15,代码来源:PeopleFullCreditViewPagerFragment.java

示例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;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:SportCourseFragment.java

示例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);
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:12,代码来源:ProgressFragment.java

示例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;
}
 
开发者ID:nen155,项目名称:TFG-SmartU-La-red-social,代码行数:16,代码来源:FragmentProyectos.java

示例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;
}
 
开发者ID:alphater,项目名称:garras,代码行数:10,代码来源:Bundler.java

示例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;
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:8,代码来源:PhotoPagerFragment.java

示例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);
}
 
开发者ID:OlgaKuklina,项目名称:GitJourney,代码行数:34,代码来源:FetchAddressIntentService.java

示例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);
}
 
开发者ID:dazcode,项目名称:smart-device-cloud,代码行数:12,代码来源:MainActivity.java

示例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;
}
 
开发者ID:nen155,项目名称:TFG-SmartU-La-red-social,代码行数:16,代码来源:FragmentComentarios.java

示例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);
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:11,代码来源:UserReplyActivity.java

示例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);
}
 
开发者ID:Bilibili,项目名称:boxing,代码行数:9,代码来源:BoxingViewActivity.java


注:本文中的android.os.Bundle.putParcelableArrayList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。