Example usage for android.os Bundle putIntegerArrayList

List of usage examples for android.os Bundle putIntegerArrayList

Introduction

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

Prototype

@Override
public void putIntegerArrayList(@Nullable String key, @Nullable ArrayList<Integer> value) 

Source Link

Document

Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:org.matrix.androidsdk.fragments.IconAndTextDialogFragment.java

public static IconAndTextDialogFragment newInstance(Integer[] iconResourcesList, Integer[] textResourcesList,
        Integer backgroundColor, Integer textColor) {
    IconAndTextDialogFragment f = new IconAndTextDialogFragment();
    Bundle args = new Bundle();

    args.putIntegerArrayList(ARG_ICONS_LIST_ID, new ArrayList<>(Arrays.asList(iconResourcesList)));
    args.putIntegerArrayList(ARG_TEXTS_LIST_ID, new ArrayList<>(Arrays.asList(textResourcesList)));

    if (null != backgroundColor) {
        args.putInt(ARG_BACKGROUND_COLOR, backgroundColor);
    }/*from w  w w  .  j  a  v a 2 s.c o  m*/

    if (null != textColor) {
        args.putInt(ARG_TEXT_COLOR, textColor);
    }

    f.setArguments(args);
    return f;
}

From source file:de.azapps.mirakel.settings.model_settings.special_list.dialogfragments.EditDialogFragment.java

public static EditDialogFragment newInstance(@NonNull final SpecialList list,
        @NonNull final SpecialListsBaseProperty property, @NonNull final ArrayList<Integer> backStack,
        @NonNull final OnPropertyEditListener listener,
        @NonNull final SpecialListsConjunctionList rootProperty) {
    final EditDialogFragment fragment = new EditDialogFragment();
    final Bundle args = new Bundle();
    args.putParcelable(LIST_KEY, list);//w  ww .j av  a2  s .c  o  m
    args.putParcelable(PROPERTY_KEY, property);
    args.putParcelable(ROOT_PROPERTY_KEY, rootProperty);
    args.putIntegerArrayList(BACK_STACK_KEY, backStack);
    fragment.setArguments(args);
    fragment.onEditListener = listener;

    return fragment;
}

From source file:com.example.android.android_me.ui.BodyPartFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putIntegerArrayList(IMAGE_ID_LIST, (ArrayList<Integer>) mImageIds);
    outState.putInt(LIST_INDEX, mListIndex);
}

From source file:ch.hesso.master.sweetcity.activity.tag.TagSelectionActivity.java

@Override
public void onClick(View v) {
    SparseBooleanArray checked = listView.getCheckedItemPositions();
    ArrayList<Integer> selectedItems = new ArrayList<Integer>();
    for (int i = 0; i < checked.size(); i++) {
        int position = checked.keyAt(i);

        if (checked.valueAt(i)) {
            selectedItems.add(CurrentTagList.getInstance().getPosition(adapter.getItem(position)));
        }/* ww  w  . ja va 2s. c  o m*/
    }

    // Return tag selection list to the parent activity
    Intent resultIntent = new Intent();
    Bundle bundle = new Bundle();
    bundle.putIntegerArrayList("selectedItems", selectedItems);
    resultIntent.putExtras(bundle);
    setResult(Activity.RESULT_OK, resultIntent);
    finish();
}

From source file:com.piusvelte.cloudset.android.ActionsFragment.java

@Override
public void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
    state.putIntegerArrayList(EXTRA_LOADER_IDS, loaderIds);
}

From source file:com.grarak.kerneladiutor.views.XYGraph.java

@Override
protected Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putIntegerArrayList("arrayList", mPercentages);
    return super.onSaveInstanceState();
}

From source file:com.nextgis.maplibui.control.PhotoGallery.java

@Override
protected Parcelable onSaveInstanceState() {
    Bundle bundle = (Bundle) super.onSaveInstanceState();
    bundle.putIntegerArrayList(BUNDLE_DELETED_IMAGES, new ArrayList<>(getDeletedAttaches()));

    return bundle;
}

From source file:bbct.android.common.activity.FilterCards.java

@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putIntegerArrayList(INPUT_EXTRA, enabledFields);
}

From source file:com.btmura.android.reddit.app.ThingPagerAdapter.java

@Override
public Parcelable saveState() {
    Bundle state = (Bundle) super.saveState();
    if (state != null) {
        state.putIntegerArrayList(STATE_PAGE_TYPES, pageTypes);
        state.putIntegerArrayList(STATE_OLD_PAGE_TYPES, oldPageTypes);
    }//from w w  w.ja v  a2 s  .  c om
    return state;
}

From source file:com.github.mguidi.asyncop.AsyncOpHelper.java

/**
 * @param outState state/*from w ww  .  j  av a 2s.com*/
 */
public void onSaveInstanceState(Bundle outState) {
    outState.putString(SAVED_ID_HELPER, mIdHelper);
    outState.putInt(SAVED_ID_REQUEST, mNextIdRequest);
    outState.putIntegerArrayList(SAVED_PENDING_REQUESTS, mPendingRequests);
    outState.putBundle(SAVED_MAP_PENDING_REQUESTS_ACTION, mMapPendingRequestsAction);
}