Example usage for android.os Bundle putLong

List of usage examples for android.os Bundle putLong

Introduction

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

Prototype

public void putLong(@Nullable String key, long value) 

Source Link

Document

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

Usage

From source file:com.github.jvanhie.discogsscrobbler.ReleaseListActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    if (mSelected > 0) {
        // Serialize and persist the activated item position.
        outState.putLong(STATE_RELEASE_SELECTED, mSelected);
    }//from ww  w.  j a  va  2  s.  com
    outState.putInt(STATE_PANES, mPanes);

}

From source file:com.hangulo.powercontact.ErrorContactsListFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    // save mSearchkeyword

    outState.putLong(LAST_DATA_ID_KEY, mLastDataId);
    outState.putLong(LAST_CONTACT_ID_KEY, mLastContactId);
    outState.putString(LAST_LOOKUP_KEY, mLastLookupKey);
    super.onSaveInstanceState(outState);

}

From source file:com.andrew.apollo.menu.PlaylistDialog.java

@Override
public void onSaveInstanceState(Bundle outcicle) {

    if (INTENT_RENAME_PLAYLIST.equals(action)) {
        outcicle.putString(INTENT_KEY_DEFAULT_NAME, mPlaylist.getText().toString());
        outcicle.putLong(INTENT_KEY_RENAME, mRenameId);
    } else if (INTENT_CREATE_PLAYLIST.equals(action)) {
        outcicle.putString(INTENT_KEY_DEFAULT_NAME, mPlaylist.getText().toString());
    }// ww w  .j  a va 2s. c  o  m
}

From source file:com.appsimobile.appsii.hotspotmanager.HotspotSettingsFragment.java

@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putLong("default_page_id", mDefaultPageId);
}

From source file:com.noshufou.android.su.AppDetailsFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    if (mShownIndex != -1) {
        outState.putLong("mShownIndex", mShownIndex);
    }/*w w w  .  j a va2 s. c  o m*/

    super.onSaveInstanceState(outState);
}

From source file:org.anhonesteffort.flock.registration.model.FlockAccount.java

public Bundle toBundle() throws JsonProcessingException {
    Bundle bundle = new Bundle();

    bundle.putString(KEY_ACCOUNT_ID, id);
    bundle.putInt(KEY_VERSION, version);
    bundle.putString(KEY_STRIPE_CUSTOMER_ID, stripeCustomerId);
    bundle.putString(KEY_PASSWORD_SHA512, passwordSha512);
    bundle.putLong(KEY_CREATE_DATE, createDate.getTime());
    bundle.putBoolean(KEY_LAST_STRIPE_CHARGE_FAILED, lastStripeChargeFailed);
    bundle.putBoolean(KEY_AUTO_RENEW_ENABLED, autoRenewEnabled);
    bundle.putInt(KEY_SUBSCRIPTION_PLAN_TYPE, subscriptionPlan.getPlanType());
    bundle.putString(KEY_SUBSCRIPTION_PLAN, subscriptionPlan.serialize());

    return bundle;
}

From source file:ca.rmen.android.palidamuerte.app.poem.detail.PoemDetailActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    Log.v(TAG, "onSaveInstanceState: outState = " + outState);
    if (mPoemPagerAdapter != null) {
        long poemId = mPoemPagerAdapter.getPoemIdAt(mViewPager.getCurrentItem());
        outState.putLong(PoemDetailFragment.ARG_ITEM_ID, poemId);
    }/*from  ww  w .  j av  a 2 s  .  c  o  m*/
}

From source file:com.amansoni.tripbook.activity.AddItemActivity.java

private void replaceListFragment(HorizontalListFragment fragment, int horizontalList, String itemType) {
    Bundle listArgs = new Bundle();
    if (!isImport && mTripbookItem != null)
        listArgs.putLong("itemId", mTripbookItem.getId());
    listArgs.putString("itemType", itemType);
    listArgs.putBoolean("editable", true);
    fragment.setArguments(listArgs);/*from  w ww  .j  a va2s .c  o  m*/

    // update the main content by replacing fragments
    FragmentManager fragmentManager = this.getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(horizontalList, fragment).commit();
}

From source file:com.enadein.carlogbook.core.CarLogbookMediator.java

public void showUpdateDataValue(int type, long id) {
    //      if (DBUtils.isDataValueIsSystemById(activity.getContentResolver(), id)) {
    //         showAlert(activity.getString(R.string.value_sys_error));
    //      } else {
    Bundle params = new Bundle();
    params.putInt(BaseActivity.TYPE_KEY, type);
    params.putInt(BaseActivity.MODE_KEY, AddUpdateDataValue.PARAM_EDIT);
    params.putLong(BaseActivity.ENTITY_ID, id);
    startActivity(AddUpdateDataValue.class, params);
    //      }/*from   w  w w .  j  a  v  a2s  . c  o  m*/
}

From source file:com.ibm.pi.beacon.PIBeaconSensor.java

private Bundle getBundle() {
    Bundle extras = new Bundle();
    extras.putSerializable(ADAPTER_KEY, mAdapter);
    extras.putLong(SEND_INTERVAL_KEY, mPrefs.getLong(SEND_INTERVAL_KEY, 5000l));
    extras.putLong(BACKGROUND_BETWEEN_SCAN_PERIOD_KEY,
            mPrefs.getLong(BACKGROUND_BETWEEN_SCAN_PERIOD_KEY, 60000l));
    extras.putLong(BACKGROUND_SCAN_PERIOD_KEY, mPrefs.getLong(BACKGROUND_SCAN_PERIOD_KEY, 1100l));
    if (mPrefs.contains(BEACON_LAYOUT_KEY)) {
        extras.putString(BEACON_LAYOUT_KEY, mPrefs.getString(BEACON_LAYOUT_KEY, ""));
    }// w  w  w.  j  a  v a  2  s .  c o m
    if (startSensorInBackgroundMode) {
        extras.putBoolean(START_IN_BACKGROUND_KEY, true);
        startSensorInBackgroundMode = false;
    }

    return extras;
}