List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.bydavy.card.receipts.fragments.PreviewPictureFragment.java
public static PreviewPictureFragment newInstance(long receiptId) { if (receiptId <= 0) { throw new IllegalArgumentException("receipt id must be > 0"); }/*from w w w .j a v a2s. c om*/ final PreviewPictureFragment f = new PreviewPictureFragment(); final Bundle args = new Bundle(); args.putLong(ARG_RECEIPT_ID, receiptId); f.setArguments(args); return f; }
From source file:com.rks.musicx.ui.fragments.PlaylistFragment.java
public static PlaylistFragment newInstance(Playlist playlist) { PlaylistFragment fragment = new PlaylistFragment(); Bundle args = new Bundle(); args.putLong(PARAM_PLAYLIST_ID, playlist.getId()); args.putString(PARAM_PLAYLIST_NAME, playlist.getName()); fragment.setArguments(args);//from ww w . j a va 2 s . c o m return fragment; }
From source file:Main.java
/** * Removes key if value is null/*from w w w. ja va2 s. com*/ */ @NonNull public static Bundle toBundle(Bundle bundleIn, String key, Long value) { Bundle bundle = bundleIn == null ? new Bundle() : bundleIn; if (!TextUtils.isEmpty(key)) { if (value == null) { bundle.remove(key); } else { bundle.putLong(key, value); } } return bundle; }
From source file:com.cnm.cnmrc.fragment.RcChannelVolume.java
public static RcChannelVolume newInstance(long num) { RcChannelVolume f = new RcChannelVolume(); Bundle args = new Bundle(); args.putLong("num", num); f.setArguments(args);// w w w. j a va 2 s . c o m return f; }
From source file:cn.studyjams.s2.sj0132.bowenyan.mygirlfriend.nononsenseapps.notepad.ui.common.DialogEditList.java
public static DialogEditList getInstance(final long listid) { DialogEditList dialog = new DialogEditList(); Bundle args = new Bundle(); args.putLong(LIST_ID, listid); dialog.setArguments(args);// w w w .ja v a 2s .c o m return dialog; }
From source file:com.lambdasoup.quickfit.ui.SchedulesFragment.java
public static SchedulesFragment create(long workoutId) { Timber.d("Creating schedules fragment with id %d", workoutId); Bundle arguments = new Bundle(); arguments.putLong(ARG_WORKOUT_ID, workoutId); SchedulesFragment fragment = new SchedulesFragment(); fragment.setArguments(arguments);/*from ww w .j ava 2 s . c o m*/ Timber.d("created schedules fragment: %d", fragment.hashCode()); return fragment; }
From source file:com.rks.musicx.ui.fragments.AlbumFragment.java
public static AlbumFragment newInstance(Album album) { AlbumFragment fragment = new AlbumFragment(); Bundle args = new Bundle(); args.putLong(ALBUM_ID, album.getId()); args.putString(ALBUM_NAME, album.getAlbumName()); args.putString(ALBUM_ARTIST, album.getArtistName()); args.putInt(ALBUM_YEAR, album.getYear()); args.putInt(ALBUM_TRACK_COUNT, album.getTrackCount()); fragment.setArguments(args);//from w w w. j av a 2s . c o m return fragment; }
From source file:com.androidinahurry.tunisiabanking.ui.TransactionsFragment.java
public static TransactionsFragment newInstance(String user, String password, Date startDate, Date stopDate) { TransactionsFragment fragment = new TransactionsFragment(); Bundle args = new Bundle(); args.putString(ARG_USER, user);//from ww w. j a v a2 s . c o m args.putString(ARG_PASSWORD, password); args.putLong(ARG_START_DATE, startDate.getTime()); args.putLong(ARG_STOP_DATE, stopDate.getTime()); fragment.setArguments(args); return fragment; }
From source file:com.bdenney.locl.fragment.LightboxFragment.java
public static LightboxFragment create(final String url, final String blogName, final long postId) { final LightboxFragment fragment = new LightboxFragment(); final Bundle args = new Bundle(); args.putString(ARGS_URL, url); args.putString(ARGS_BLOG_NAME, blogName); args.putLong(ARGS_POST_ID, postId); fragment.setArguments(args);//www.j a v a 2 s. c o m return fragment; }
From source file:com.bluros.music.fragments.ArtistDetailFragment.java
public static ArtistDetailFragment newInstance(long id, boolean useTransition, String transitionName) { ArtistDetailFragment fragment = new ArtistDetailFragment(); Bundle args = new Bundle(); args.putLong(Constants.ARTIST_ID, id); args.putBoolean("transition", useTransition); if (useTransition) args.putString("transition_name", transitionName); fragment.setArguments(args);/*from w w w . java 2 s . co m*/ return fragment; }