Example usage for android.os Bundle putParcelableArrayList

List of usage examples for android.os Bundle putParcelableArrayList

Introduction

In this page you can find the example usage for android.os Bundle putParcelableArrayList.

Prototype

public void putParcelableArrayList(@Nullable String key, @Nullable ArrayList<? extends Parcelable> value) 

Source Link

Document

Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:me.diskstation.ammon.gpsrunner.ui.OverviewFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    if (drawAct.mBound) {
        if (run != null) {
            outState.putBundle("run", run);
        }//from  w  w w  .ja va 2s  .  c o  m
        if (waypoints != null) {
            outState.putParcelableArrayList("waypoints", waypoints);
        }
    }
}

From source file:com.bb.hbx.activitiy.InsurancePlanActivity.java

@Override
public void onClick(View v) {
    switch (v.getId()) {
    case R.id.commit_tv:
        Bundle bundle = new Bundle();
        bundle.putParcelable("GetCarInsCalcBean", getCarInsCalcBean);
        bundle.putParcelableArrayList("benefitList", (ArrayList<? extends Parcelable>) benefitTotalList);
        if (getCarInsCalcBean == null) {
            showTip("??");
            return;
        }//from   w  w  w.  j  av  a2 s  .c o  m
        bundle.putString("insurerId", insurerId);
        bundle.putString("serialId", serialId);
        bundle.putString("licenseNo", licenseNo);
        bundle.putString("driveName", driveName);
        bundle.putString("idNo", idNo);
        bundle.putString("mobile", mobile);
        bundle.putString("insureName", insureName);
        bundle.putString("city", city);
        bundle.putString("carExtras", carExtrasForPay);
        bundle.putString("carPrice", getCarInsCalcBean.getTotalPreium());
        AppManager.getInstance().showActivity(CarOrderConfirmActivity.class, bundle);
        break;
    default:
        break;
    }
}

From source file:com.amagi82.kerbalspaceapp.MissionPlanner.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    outState.putParcelableArrayList("key", missionData);
    super.onSaveInstanceState(outState);
}

From source file:elbauldelprogramador.com.gpsqr.MapsActivity.java

/**
 * Stores activity data in the Bundle./*from  w w  w  .j a v  a2s  .  c  om*/
 */
public void onSaveInstanceState(Bundle savedInstanceState) {
    savedInstanceState.putBoolean(REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates);

    savedInstanceState.putParcelableArrayList(LOCATION_KEY, mLocationsList);
    //        savedInstanceState.putString(LAST_UPDATED_TIME_STRING_KEY, mLastUpdateTime);
    super.onSaveInstanceState(savedInstanceState);
}

From source file:org.amahi.anywhere.fragment.NavigationFragment.java

private void tearDownServersState(Bundle state) {
    if (areServersLoaded()) {
        state.putParcelableArrayList(State.SERVERS, new ArrayList<Parcelable>(getServersAdapter().getItems()));
    }/*from  www .jav a2  s .  c o m*/
}

From source file:com.bb.hbx.activitiy.InsurancePlanActivity.java

@Override
public void initListener() {
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override/* w  w w.  j ava2s  . c om*/
        public void onClick(View v) {
            finish();
        }
    });
    mCardAdapter.setmOnItemChangePlanClickListener(new CardPagerAdapter.OnItemClickListener() {
        @Override
        public void onClick(int position) {
            //showTip("position:?"+position);
            Bundle bundle = new Bundle();
            //???
            bundle.putParcelableArrayList("syxList",
                    (ArrayList<? extends Parcelable>) planList.get(position).getSyxList());
            for (int i = 0; i < planList.get(position).getSyxList().size(); i++) {
                bundle.putParcelableArrayList("amountList" + i, (ArrayList<? extends Parcelable>) planList
                        .get(position).getSyxList().get(i).getAmountList());
            }
            //???
            bundle.putParcelableArrayList("jqxList",
                    (ArrayList<? extends Parcelable>) planList.get(position).getJqxList());
            for (int i = 0; i < planList.get(position).getJqxList().size(); i++) {
                bundle.putParcelableArrayList("amountJqxList" + i, (ArrayList<? extends Parcelable>) planList
                        .get(position).getJqxList().get(i).getAmountList());
            }
            //???
            bundle.putParcelableArrayList("fjxList",
                    (ArrayList<? extends Parcelable>) planList.get(position).getFjxList());
            for (int i = 0; i < planList.get(position).getFjxList().size(); i++) {
                bundle.putParcelableArrayList("amountFjxList" + i, (ArrayList<? extends Parcelable>) planList
                        .get(position).getFjxList().get(i).getAmountList());
            }
            //???
            bundle.putParcelableArrayList("qtxList",
                    (ArrayList<? extends Parcelable>) planList.get(position).getQtxList());
            for (int i = 0; i < planList.get(position).getQtxList().size(); i++) {
                bundle.putParcelableArrayList("amountQtxList" + i, (ArrayList<? extends Parcelable>) planList
                        .get(position).getQtxList().get(i).getAmountList());
            }
            //serialId,modelCode,carPrice,carExtras
            bundle.putString("serialId", serialId);
            bundle.putString("modelCode", modelCode);
            bundle.putString("carPrice", carPrice);
            bundle.putString("carExtras", carExtras);
            //AppManager.getInstance().showActivity(UpdateInsurancePlanActivity.class, bundle);
            AppManager.getInstance().showActivityForResult(UpdateInsurancePlanActivity.class, bundle, 100);
        }
    });
    mCardAdapter.setOnItemClickListener(new CardPagerAdapter.OnItemClickListener() {
        @Override
        public void onClick(int position) {
            showTip("position:" + position);
        }
    });
    commit_tv.setOnClickListener(this);
}

From source file:ca.shoaib.ping.PingListFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    if (mActivatedPosition != ListView.INVALID_POSITION) {
        // Serialize and persist the activated item position.
        outState.putInt(STATE_ACTIVATED_POSITION, mActivatedPosition);
    }// w w  w .j a  v  a  2  s  .  c om
    outState.putParcelableArrayList(KEY_PINGS, pingList);
}

From source file:at.tm.android.fitacity.MainActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    // Call super.onSaveInstanceState
    super.onSaveInstanceState(outState);
    // Save the exercise list in the outState Bundle
    outState.putParcelableArrayList(EXERCISE_LIST_KEY,
            new ArrayList<>(mExerciseRecyclerViewAdapter.getExercises()));
    // Save the category list in the outState Bundle
    outState.putParcelableArrayList(CATEGORY_LIST_KEY, new ArrayList<>(mCategoryMenuMap.values()));
    // Save the selected category id in the outState Bundle
    outState.putInt(SELECTED_CATEGORY_ID_KEY, mSelectedCategoryId);
}

From source file:com.github.jobs.ui.fragment.EditTemplateFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putParcelableArrayList(KEY_TEMPLATE_SERVICES, mTemplateServices);
    outState.putBoolean(KEY_EDIT_MODE, mShowEditor);
}

From source file:net.lp.actionbarpoirot.helpers.FragmentHelperHoneycomb.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putString(STATE_LAST_SELECTED_POSITION_URI,
            lastSelectedPositionUri == null ? null : lastSelectedPositionUri.toString());
    outState.putParcelableArrayList(STATE_SELECTED_POSITIONS_URIS,
            new ArrayList<Uri>(Arrays.asList(mSelectedPositionsUris.toArray(new Uri[0]))));
}