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.rappsantiago.weighttracker.profile.setup.SetGoalsFragment.java

@Override
public Bundle getProfileData() {

    Bundle data = new Bundle();

    String strTargetWeight = mTxtTargetWeightWrapper.getEditText().getText().toString();
    double targetWeight = Util.parseDouble(strTargetWeight, 0.0);

    String strTargetBodyFatIndex = mTxtTargetBodyFatIndexWrapper.getEditText().getText().toString();
    double targetBodyFatIndex = Util.parseDouble(strTargetBodyFatIndex, 0.0);

    data.putDouble(KEY_TARGET_WEIGHT, targetWeight);
    data.putDouble(KEY_TARGET_BODY_FAT_INDEX, targetBodyFatIndex);

    boolean isDueDateChecked = mChkDueDate.isChecked();

    if (isDueDateChecked) {
        data.putLong(KEY_DUE_DATE, mDueDateInMillis);
    } else {/*from www.  ja v a2 s . com*/
        data.putLong(KEY_DUE_DATE, 0L);
    }

    return data;
}

From source file:com.github.kanata3249.ffxieq.android.AugmentSelectorActivity.java

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

    outState.putInt("Part", mPart);
    outState.putInt("Race", mRace);
    outState.putInt("Job", mJob);
    outState.putInt("Level", mLevel);
    outState.putLong("Current", mCurrent);
    outState.putLong("AugId", mAugID);
    outState.putLong("Filter", mFilterID);
    outState.putBoolean("OrderByName", mOrderByName);
    outState.putString("FilterByType", mFilterByType);
}

From source file:com.coinblesk.client.KeyboardFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putLong(KEY_AMOUNT_BTC, amountBTC);
    outState.putLong(KEY_AMOUNT_FIAT, amountFiat);
    outState.putBoolean(KEY_IS_BITCOIN_LARGE_AMOUNT, isBitcoinPrimary);
    outState.putInt(KEY_DIGIT_COUNTER, digitCounter);
    outState.putInt(KEY_DOT_AT_POS, dotAtPos);
}

From source file:com.nextgis.firereporter.GetFiresService.java

protected void SendScanexItem(ScanexSubscriptionItem item) {
    if (mScanexReceiver == null)
        return;//w w  w  . ja  v a2 s . co m
    Bundle b = new Bundle();
    b.putLong(SUBSCRIPTION_ID, item.GetId());
    b.putInt(TYPE, SCANEX_SUBSCRIPTION);
    b.putParcelable(ITEM, item);
    mScanexReceiver.send(SERVICE_SCANEXDATA, b);
}

From source file:org.dvbviewer.controller.ui.fragments.ChannelEpg.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putParcelable(Channel.class.getName(), mCHannel);
    outState.putLong(KEY_EPG_DAY, mDateInfo.getEpgDate().getTime());
}

From source file:com.bydavy.card.receipts.fragments.ReceiptEditFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    if (getState() == StateFragmentListener.STATE_COMPLETED) {
        outState.putBoolean(STATE_SAVED_DATA, true);
        outState.putBoolean(STATE_VALID_RECEIPT, mValidReceipt);
        if (mValidReceipt) {
            // TODO Save and restore only edited fields (others must come
            // from db)
            outState.putString(STATE_SHOP, mViewShop.getText().toString());
            outState.putLong(STATE_DATE, mDate.getTimeInMillis());
            outState.putString(STATE_NOTE, STATE_NOTE);
            try {
                outState.putFloat(STATE_TOTAL, Float.valueOf(mViewTotal.getText().toString()));
            } catch (final NumberFormatException e) {
                /* Nothing */
            }//from   w ww . j a  v  a  2 s .c  o m
        }
    }
    super.onSaveInstanceState(outState);
}

From source file:com.nextgis.firereporter.GetFiresService.java

public void onNewNotifictation(long subscriptionID, ScanexNotificationItem item) {
    String sAdds = item.GetPlace().equals("null") ? item.GetType() : item.GetPlace();
    onNotify(3, item.GetShortCoordinates() + "/" + sAdds + "/" + item.GetDateAsString());

    if (mScanexReceiver == null)
        return;/*from   w ww  . ja v  a  2 s  . c o  m*/
    Bundle b = new Bundle();
    b.putLong(SUBSCRIPTION_ID, subscriptionID);
    b.putLong(NOTIFICATION_ID, item.GetId());
    b.putInt(TYPE, SCANEX_NOTIFICATION);
    b.putParcelable(ITEM, item);
    mScanexReceiver.send(SERVICE_SCANEXDATA, b);

    mbHasChanges = true;
}

From source file:com.danvelazco.fbwrapper.activity.BaseFacebookWebViewActivity.java

/**
 * {@inheritDoc}//from   ww w.  ja  v  a 2s. com
 */
@Override
protected void onSaveInstanceState(@NonNull Bundle outState) {
    // Save the current time to the state bundle
    outState.putLong(KEY_SAVE_STATE_TIME, System.currentTimeMillis());

    // Save the state of the WebView as a Bundle to the Instance State
    mWebView.saveState(outState);
    super.onSaveInstanceState(outState);
}

From source file:com.carlrice.reader.fragment.EntryFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putParcelable(STATE_BASE_URI, mBaseUri);
    outState.putLongArray(STATE_ENTRIES_IDS, mEntriesIds);
    outState.putLong(STATE_INITIAL_ENTRY_ID, mInitialEntryId);
    outState.putInt(STATE_CURRENT_PAGER_POS, mCurrentPagerPos);

    super.onSaveInstanceState(outState);
}

From source file:ca.uwaterloo.magic.goodhikes.MapsActivity.java

@Override
public void onSaveInstanceState(Bundle outState) {
    if (selectedRoute != null)
        outState.putLong(RouteEntry._ID, selectedRoute.getId());
    if (followingExistingRoute != false)
        outState.putBoolean("followingExistingRoute", followingExistingRoute);
    super.onSaveInstanceState(outState);
}