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.google.android.apps.mytracks.fragments.ConfirmPlayDialogFragment.java

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

    ConfirmPlayDialogFragment confirmPlayDialogFragment = new ConfirmPlayDialogFragment();
    confirmPlayDialogFragment.setArguments(bundle);
    return confirmPlayDialogFragment;
}

From source file:com.lambdasoup.quickfit.ui.CaloriesDialogFragment.java

public static CaloriesDialogFragment newInstance(long workoutId, int oldValue) {
    CaloriesDialogFragment fragment = new CaloriesDialogFragment();
    Bundle args = new Bundle();
    args.putLong(KEY_WORKOUT_ID, workoutId);
    args.putInt(KEY_OLD_VALUE, oldValue);
    fragment.setArguments(args);//from   ww w.jav a2 s . c o m
    return fragment;
}

From source file:com.doctoror.fuckoffmusicplayer.presentation.library.DeleteItemDialogFragment.java

@NonNull
private static Bundle createArguments(final long targetId, @Nullable final String targetName) {
    final Bundle args = new Bundle();
    args.putLong(EXTRA_ID, targetId);
    args.putString(EXTRA_NAME, targetName);
    return args;/*from ww  w .j  a  v  a2  s.co  m*/
}

From source file:com.google.android.apps.mytracks.fragments.DeleteOneTrackDialogFragment.java

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

    DeleteOneTrackDialogFragment deleteOneTrackDialogFragment = new DeleteOneTrackDialogFragment();
    deleteOneTrackDialogFragment.setArguments(bundle);
    return deleteOneTrackDialogFragment;
}

From source file:com.lambdasoup.quickfit.ui.DurationMinutesDialogFragment.java

public static DurationMinutesDialogFragment newInstance(long workoutId, int oldValue) {
    DurationMinutesDialogFragment fragment = new DurationMinutesDialogFragment();
    Bundle args = new Bundle();
    args.putLong(KEY_WORKOUT_ID, workoutId);
    args.putInt(KEY_OLD_VALUE, oldValue);
    fragment.setArguments(args);/*from   w w  w .  jav  a2 s. co m*/
    return fragment;
}

From source file:com.lambdasoup.quickfit.ui.ActivityTypeDialogFragment.java

public static ActivityTypeDialogFragment newInstance(long workoutId, FitActivity oldValue) {
    ActivityTypeDialogFragment fragment = new ActivityTypeDialogFragment();
    Bundle args = new Bundle();
    args.putLong(KEY_WORKOUT_ID, workoutId);
    args.putString(KEY_OLD_VALUE_KEY, oldValue.key);
    fragment.setArguments(args);/*www.  ja va2 s.  c  o m*/
    return fragment;
}

From source file:Main.java

/**
 * Puts long value into a bundle. If bundle is null new one will be created.
 *
 * @param bundle to put into//from w w w  . j a v  a2s  . c  o m
 * @param key    to put under
 * @param value  to put
 * @return bundle with the value
 */
public static Bundle putLong(Bundle bundle, String key, long value) {
    if (bundle == null) {
        bundle = new Bundle();
    }
    bundle.putLong(key, value);
    return bundle;
}

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

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

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

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

public static DeletePlaylistDialog newInstance(String title, long playlist) {
    Bundle b = new Bundle();
    b.putString(Config.NAME, title);/*from ww w.j  a  va2  s. c o m*/
    b.putLong("playlist", playlist);
    DeletePlaylistDialog f = new DeletePlaylistDialog();
    f.setArguments(b);
    return f;
}

From source file:com.example.crudcontent.fragment.DatePickerDialogFragment.java

public static DatePickerDialogFragment newInstance(Date date) {
    DatePickerDialogFragment fragment = new DatePickerDialogFragment();
    Bundle args = new Bundle();
    args.putLong(ARG_DATE, date.getTime());
    fragment.setArguments(args);/*w  ww .  j  a v  a 2  s.  c o m*/
    return fragment;
}