List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.lambdasoup.quickfit.ui.DayOfWeekDialogFragment.java
public static DayOfWeekDialogFragment newInstance(long objectId, DayOfWeek oldValue) { DayOfWeekDialogFragment fragment = new DayOfWeekDialogFragment(); Bundle args = new Bundle(); args.putLong(KEY_SCHEDULE_ID, objectId); args.putParcelable(KEY_OLD_VALUE, oldValue); fragment.setArguments(args);// www.jav a 2 s . com return fragment; }
From source file:com.github.suzukaze.yarulistfortodoly.fragment.ItemListFragment.java
public static ItemListFragment newInstance(Project project) { ItemListFragment itemListFragment = new ItemListFragment(); Bundle arguments = new Bundle(); arguments.putLong(KEY_PROJECT_ID, project.getId()); itemListFragment.setArguments(arguments); return itemListFragment; }
From source file:com.lambdasoup.quickfit.ui.LabelDialogFragment.java
public static LabelDialogFragment newInstance(long workoutId, String oldValue) { LabelDialogFragment fragment = new LabelDialogFragment(); Bundle args = new Bundle(); args.putLong(KEY_WORKOUT_ID, workoutId); args.putString(KEY_OLD_VALUE, oldValue); fragment.setArguments(args);/* w ww.j a v a 2 s .c o m*/ return fragment; }
From source file:com.android.utils.labeling.LabelOperationUtils.java
public static boolean startActivityEditLabel(Context context, Label label) { if (context == null || label == null) { return false; }//from w w w . j a v a 2 s .co m final Intent editIntent = new Intent(ACTION_EDIT_LABEL); final Bundle extras = new Bundle(); extras.putLong(EXTRA_LONG_LABEL_ID, label.getId()); editIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); editIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); editIntent.putExtras(extras); try { context.startActivity(editIntent); return true; } catch (Exception e) { e.printStackTrace(); return false; } }
From source file:com.android.utils.labeling.LabelOperationUtils.java
public static boolean startActivityRemoveLabel(Context context, Label label) { if (context == null || label == null) { return false; }// ww w . j a va 2 s . c o m final Intent removeIntent = new Intent(ACTION_REMOVE_LABEL); final Bundle extras = new Bundle(); extras.putLong(EXTRA_LONG_LABEL_ID, label.getId()); removeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); removeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); removeIntent.putExtras(extras); try { context.startActivity(removeIntent); return true; } catch (Exception e) { e.printStackTrace(); return false; } }
From source file:com.creationgroundmedia.popularmovies.reviews.ReviewFragment.java
@SuppressWarnings("unused") public static ReviewFragment newInstance(long movieId) { ReviewFragment fragment = new ReviewFragment(); Bundle args = new Bundle(); args.putLong(MoviesContract.MovieEntry.COLUMN_ID_KEY, movieId); fragment.setArguments(args);// w ww . j a v a 2 s .co m return fragment; }
From source file:com.google.android.apps.mytracks.fragments.AddEmailsDialogFragment.java
public static AddEmailsDialogFragment newInstance(long trackId) { Bundle bundle = new Bundle(); bundle.putLong(KEY_TRACK_ID, trackId); AddEmailsDialogFragment addPeopleDialogFragment = new AddEmailsDialogFragment(); addPeopleDialogFragment.setArguments(bundle); return addPeopleDialogFragment; }
From source file:com.alchemiasoft.book.fragment.BookDetailFragment.java
/** * Creates a new BookDetailFragment for the given book id. * * @param bookId of the book that has to be shown. * @return the BookDetailFragment ready to be attached. *//*w w w .j a v a 2s. c o m*/ public static BookDetailFragment create(long bookId) { final BookDetailFragment fragment = new BookDetailFragment(); final Bundle args = new Bundle(); args.putLong(ARG_BOOK_ID, bookId); fragment.setArguments(args); return fragment; }
From source file:com.creationgroundmedia.popularmovies.trailers.TrailerFragment.java
@SuppressWarnings("unused") public static TrailerFragment newInstance(long movieId) { TrailerFragment fragment = new TrailerFragment(); Bundle args = new Bundle(); args.putLong(MoviesContract.MovieEntry.COLUMN_ID_KEY, movieId); fragment.setArguments(args);/* w w w . ja v a 2 s . c o m*/ return fragment; }
From source file:com.andryr.musicplayer.fragments.dialog.AlbumEditorDialog.java
public static AlbumEditorDialog newInstance(Album album) { AlbumEditorDialog fragment = new AlbumEditorDialog(); Bundle args = new Bundle(); args.putLong(ARG_ID, album.getId()); args.putString(ARG_NAME, album.getAlbumName()); args.putString(ARG_ARTIST, album.getArtistName()); args.putInt(ARG_YEAR, album.getYear()); args.putInt(ARG_TRACK_COUNT, album.getTrackCount()); fragment.setArguments(args);/* w w w. ja va 2s . c om*/ return fragment; }