Example usage for android.os Bundle putIntArray

List of usage examples for android.os Bundle putIntArray

Introduction

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

Prototype

public void putIntArray(@Nullable String key, @Nullable int[] value) 

Source Link

Document

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

Usage

From source file:org.xdty.preference.colorpicker.ColorPickerDialog.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putIntArray(KEY_COLORS, mColors);
    outState.putInt(KEY_SELECTED_COLOR, mSelectedColor);
    outState.putStringArray(KEY_COLOR_CONTENT_DESCRIPTIONS, mColorContentDescriptions);
    outState.putString("key", key);
}

From source file:de.aw.monma.snippets.SnippetDepotUebersicht.java

@Override
protected void setInternalArguments(Bundle args) {
    super.setInternalArguments(args);
    args.putParcelable(DBDEFINITION, tbd);
    args.putInt(VIEWHOLDERLAYOUT, detailView);
    args.putIntArray(VIEWRESIDS, viewResIDs);
    args.putStringArray(PROJECTION, projection);
    args.putString(SELECTION, selection);
    args.putString(GROUPBY, groupBy);/*from  w w w .  j  a  va2  s .  c o  m*/
    args.putString(ORDERBY, orderBy);
    Calendar cal = Calendar.getInstance();
    year = cal.get(Calendar.YEAR);
}

From source file:com.billooms.harppedals.HarpPedalsActivity.java

/**
 * Launch a new ChordFragment./*  w  w  w . ja  v a 2s.c  o m*/
 */
private void launchChordFragment() {
    // Create fragment
    ChordFragment chordFragment = new ChordFragment();
    // set arguments for any previously saved Chord
    if (savedChordArray != null) {
        Bundle args = new Bundle();
        args.putIntArray(ARG_CHORD, savedChordArray);
        args.putBooleanArray(ARG_CHORDADD, savedChordAddArray);
        chordFragment.setArguments(args);
    }
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    // Replace whatever is in the fragment_container view with this fragment
    transaction.replace(R.id.fragment_container, chordFragment, NO_SWIPE);
    // and add the transaction to the back stack so the user can navigate back
    transaction.addToBackStack(null);
    // Commit the transaction
    transaction.commit();
}

From source file:com.gawdl3y.android.tasktimer.adapters.NewFragmentStatePagerAdapter.java

@Override
public Parcelable saveState() {
    Bundle state = new Bundle();
    if (mItemIds.length > 0) {
        state.putIntArray("itemids", mItemIds);
    }//from  w  ww  .  j  a  va2s .  c o m
    if (mSavedState.size() > 0) {
        Fragment.SavedState[] fss = new Fragment.SavedState[mSavedState.size()];
        mSavedState.toArray(fss);
        state.putParcelableArray("states", fss);
    }
    for (int i = 0; i < mFragments.size(); i++) {
        Fragment f = mFragments.get(i);
        if (f != null) {
            String key = "f" + i;
            mFragmentManager.putFragment(state, key, f);
        }
    }
    return state;
}

From source file:io.github.hidroh.materialistic.BaseListFragment.java

private void showPreferences() {
    Bundle args = new Bundle();
    args.putInt(PopupSettingsFragment.EXTRA_TITLE, R.string.list_display_options);
    args.putInt(PopupSettingsFragment.EXTRA_SUMMARY, R.string.pull_up_hint);
    args.putIntArray(PopupSettingsFragment.EXTRA_XML_PREFERENCES,
            new int[] { R.xml.preferences_font, R.xml.preferences_list });
    ((DialogFragment) Fragment.instantiate(getActivity(), PopupSettingsFragment.class.getName(), args))
            .show(getFragmentManager(), PopupSettingsFragment.class.getName());
}

From source file:com.fast.access.kam.widget.colorpicker.dashclockpicker.ColorPickerDialogDash.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putIntArray(KEY_COLORS, mColorChoices);
    outState.putSerializable(KEY_SELECTED_COLOR, mSelectedColor);
}

From source file:de.aw.awlib.fragments.AWFileChooser.java

@Override
protected void setInternalArguments(Bundle args) {
    super.setInternalArguments(args);
    args.putIntArray(VIEWRESIDS, viewResIDs);
    args.putInt(VIEWHOLDERLAYOUT, viewHolderLayout);
}

From source file:de.uulm.graphicalpasswords.openuyi.UYICreatePasswordActivity.java

public void submit(View view) {
    SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
    SharedPreferences.Editor edit = sharedPref.edit();
    edit.putString("uyi_pw", Picture.distortedToSortedString(selectedPictures));
    edit.commit();//w  ww  . ja  v  a  2s  .  com

    Bundle bundle = new Bundle();
    bundle.putIntArray("input", Picture.distortedToIntArray(selectedPictures));
    DialogFragment dialog = new RememberPasswordDialogFragment();
    dialog.setArguments(bundle);
    dialog.show(getFragmentManager(), "remember");
}

From source file:com.dm.material.dashboard.candybar.fragments.dialog.InAppBillingFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putInt(TYPE, mType);/*from  w  w w  .  j a v a  2  s  .com*/
    outState.putString(KEY, mKey);
    outState.putStringArray(PRODUCT_ID, mProductsId);
    outState.putIntArray(PRODUCT_COUNT, mProductsCount);
    super.onSaveInstanceState(outState);
}

From source file:de.aw.awlib.fragments.AWRemoteFileChooser.java

@Override
protected void setInternalArguments(Bundle args) {
    super.setInternalArguments(args);
    args.putInt(LAYOUT, layout);/*from  ww  w.ja  va  2s.com*/
    args.putIntArray(VIEWRESIDS, viewResIDs);
    args.putInt(VIEWHOLDERLAYOUT, viewHolderLayout);
}