當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。