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.andryr.musicplayer.fragments.dialog.ID3TagEditorDialog.java

public static ID3TagEditorDialog newInstance(Song song) {
    ID3TagEditorDialog fragment = new ID3TagEditorDialog();
    Bundle args = new Bundle();
    args.putLong(ARG_ID, song.getId());
    args.putString(ARG_TITLE, song.getTitle());
    args.putString(ARG_ARTIST, song.getArtist());
    args.putString(ARG_ALBUM, song.getAlbum());
    args.putLong(ARG_ALBUM_ID, song.getAlbumId());
    args.putInt(ARG_TRACK_NUMBER, song.getTrackNumber());
    fragment.setArguments(args);//www .j a va 2  s . c  o  m
    return fragment;
}

From source file:com.money.manager.ex.budget.BudgetDetailFragment.java

/**
 * Use this factory method to create a new instance of
 * this fragment using the provided parameters.
 *
 * @return A new instance of fragment BudgetDetailFragment.
 *///from   w w w .  ja  v a  2  s .  c  om
public static BudgetDetailFragment newInstance(long budgetYearId, String budgetName) {
    BudgetDetailFragment fragment = new BudgetDetailFragment();
    Bundle args = new Bundle();
    args.putLong(ARG_BUDGET_YEAR_ID, budgetYearId);
    args.putString(ARG_BUDGET_NAME_ID, budgetName);
    fragment.setArguments(args);

    return fragment;
}

From source file:com.freshdigitable.udonroad.UserInfoFragment.java

public static UserInfoFragment create(long userId) {
    final UserInfoFragment userInfoAppbarFragment = new UserInfoFragment();
    final Bundle args = new Bundle();
    args.putLong("userId", userId);
    userInfoAppbarFragment.setArguments(args);
    return userInfoAppbarFragment;
}

From source file:com.cerema.cloud2.ui.dialog.ExpirationDatePickerDialogFragment.java

/**
 *  Factory method to create new instances
 *
 *  @param file                 File to bind an expiration date
 *  @param chosenDateInMillis   Date chosen when the dialog appears
 *  @return                     New dialog instance
 *//*from  w  ww  . j  a v a 2  s.c om*/
public static ExpirationDatePickerDialogFragment newInstance(OCFile file, long chosenDateInMillis) {
    Bundle arguments = new Bundle();
    arguments.putParcelable(ARG_FILE, file);
    arguments.putLong(ARG_CHOSEN_DATE_IN_MILLIS, chosenDateInMillis);

    ExpirationDatePickerDialogFragment dialog = new ExpirationDatePickerDialogFragment();
    dialog.setArguments(arguments);
    return dialog;
}

From source file:com.facebook.login.LoginLogger.java

static Bundle newAuthorizationLoggingBundle(String authLoggerId) {
    // We want to log all parameters for all events, to ensure stability of columns across
    // different event types.
    Bundle bundle = new Bundle();
    bundle.putLong(EVENT_PARAM_TIMESTAMP, System.currentTimeMillis());
    bundle.putString(EVENT_PARAM_AUTH_LOGGER_ID, authLoggerId);
    bundle.putString(EVENT_PARAM_METHOD, "");
    bundle.putString(EVENT_PARAM_LOGIN_RESULT, "");
    bundle.putString(EVENT_PARAM_ERROR_MESSAGE, "");
    bundle.putString(EVENT_PARAM_ERROR_CODE, "");
    bundle.putString(EVENT_PARAM_EXTRAS, "");
    return bundle;
}

From source file:com.example.xyzreader.ui.DetailFragment.java

public static DetailFragment newInstance(long itemId, String title) {
    Bundle arguments = new Bundle();
    arguments.putLong(ARG_ITEM_ID, itemId);
    arguments.putString("title", title);
    DetailFragment fragment = new DetailFragment();
    fragment.setArguments(arguments);/*from  www .  j  a  v  a2s  .  c o  m*/
    return fragment;
}

From source file:com.owncloud.android.ui.dialog.ExpirationDatePickerDialogFragment.java

/**
 * Factory method to create new instances
 *
 * @param chosenDateInMillis    Date chosen when the dialog appears, in milliseconds elapsed
 *                              since Jan 1, 1970. Needs to be after tomorrow, or tomorrow will be used
 *                              instead.
 * @param maxDateInMillis       Maximum date selectable, in milliseconds elapsed since Jan 1, 1970.
 *                              Only will be set if greater or equals than chosenDateInMillis and tomorrow.
 * @return New dialog instance//from  www  .  j  a  v  a2  s . c om
 */
public static ExpirationDatePickerDialogFragment newInstance(long chosenDateInMillis, long maxDateInMillis) {
    Bundle arguments = new Bundle();
    arguments.putLong(ARG_CHOSEN_DATE_IN_MILLIS, chosenDateInMillis);
    arguments.putLong(ARG_MAX_DATE_IN_MILLIS, maxDateInMillis);

    ExpirationDatePickerDialogFragment dialog = new ExpirationDatePickerDialogFragment();
    dialog.setArguments(arguments);
    return dialog;
}

From source file:br.com.bioscada.apps.biotracks.fragments.ShareTrackDialogFragment.java

public static ShareTrackDialogFragment newInstance(long trackId) {
    Bundle bundle = new Bundle();
    bundle.putLong(KEY_TRACK_ID, trackId);

    ShareTrackDialogFragment shareleTrackDialogFragment = new ShareTrackDialogFragment();
    shareleTrackDialogFragment.setArguments(bundle);
    return shareleTrackDialogFragment;
}

From source file:com.groksolutions.grok.mobile.dialog.AutoDismissDialog.java

/**
 * Create a new {@link Dialog} that will be dismissed after a period of time
 *
 * @param title The dialog title// w ww . ja  v  a 2 s  . co m
 * @param message The dialog message to display
 * @param timeout Time in milliseconds to dismiss the dialog
 * @param manager The FragmentManager this fragment will be added to
 */
public static void show(CharSequence title, CharSequence message, long timeout, FragmentManager manager) {
    synchronized (_lock) {
        if (_dialog == null) {
            _dialog = new AutoDismissDialog();
        } else {
            return;
        }
    }
    final Bundle args = new Bundle();
    args.putCharSequence("title", title);
    args.putCharSequence("message", message);
    args.putLong("timeout", timeout);
    _dialog.setArguments(args);

    _dialog.show(manager, "AutoDismissDialog");
    _dialog = null;
}

From source file:com.example.sqlbrite.todo.ui.ItemsFragment.java

public static ItemsFragment newInstance(long listId) {
    Bundle arguments = new Bundle();
    arguments.putLong(KEY_LIST_ID, listId);

    ItemsFragment fragment = new ItemsFragment();
    fragment.setArguments(arguments);//from w ww .  j a  v  a  2  s  .  c o m
    return fragment;
}