List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.davidmiguel.gobees.apiary.ApiaryHivesFragment.java
/** * Get ApiaryHivesFragment instance.//w ww . ja v a2s .c o m * * @param apiaryId apiary id. * @return ApiaryHivesFragment instance. */ public static ApiaryHivesFragment newInstance(long apiaryId) { Bundle arguments = new Bundle(); arguments.putLong(ARGUMENT_APIARY_ID, apiaryId); ApiaryHivesFragment fragment = new ApiaryHivesFragment(); fragment.setArguments(arguments); return fragment; }
From source file:com.google.android.apps.mytracks.fragments.ChooseActivityDialogFragment.java
public static ChooseActivityDialogFragment newInstance(long trackId, String trackUrl) { Bundle bundle = new Bundle(); bundle.putLong(KEY_TRACK_ID, trackId); bundle.putString(KEY_TRACK_URL, trackUrl); ChooseActivityDialogFragment chooseActivityDialogFragment = new ChooseActivityDialogFragment(); chooseActivityDialogFragment.setArguments(bundle); return chooseActivityDialogFragment; }
From source file:com.grokkingandroid.sampleapp.samples.data.contentprovider.lentitems.LentItemDisplayFragment.java
public static LentItemDisplayFragment newInstance(long itemId) { LentItemDisplayFragment f = new LentItemDisplayFragment(); Bundle bundle = new Bundle(); bundle.putLong(KEY_ITEM_ID, itemId); f.setArguments(bundle);/*from w ww. ja v a 2 s. c o m*/ return f; }
From source file:com.activiti.android.ui.fragments.form.picker.DatePickerFragment.java
public static DatePickerFragment newInstance(String dateId, String fragmentTag, Long date, Long minDate, Long maxDate, boolean timePicker) { DatePickerFragment bf = newInstance(dateId, fragmentTag, timePicker); Bundle b = bf.getArguments(); if (date != null) { b.putLong(ARGUMENT_START_DATE, date); }/* w ww . j a v a 2 s . com*/ if (minDate != null) { b.putLong(ARGUMENT_MIN_DATE, minDate); } if (maxDate != null) { b.putLong(ARGUMENT_MAX_DATE, maxDate); } bf.setArguments(b); return bf; }
From source file:com.example.xyzreader.ui.articledetail.ArticleDetailFragment.java
/** * Returns a new instance of this fragment for the given section * number.//from w ww . ja v a 2 s.c o m */ public static ArticleDetailFragment newInstance(long articleId) { ArticleDetailFragment fragment = new ArticleDetailFragment(); Bundle args = new Bundle(); args.putLong(ARTICLE_ID, articleId); fragment.setArguments(args); return fragment; }
From source file:com.cuddlesoft.nori.fragment.EditAPISettingDialogFragment.java
/** * Factory method used when editing an existing settings database entry. * * @param rowId Database row ID./*from w w w. j a va2 s .c o m*/ * @param settings Setting object to edit. * @return EditAPISettingDialogFragment with appended arguments bundle. */ public static EditAPISettingDialogFragment newInstance(long rowId, SearchClient.Settings settings) { // Create a new EditAPISettingDialogFragment. EditAPISettingDialogFragment fragment = new EditAPISettingDialogFragment(); // Append parameters to the fragment's arguments bundle. Bundle arguments = new Bundle(); arguments.putLong(BUNDLE_ID_ROW_ID, rowId); arguments.putParcelable(BUNDLE_ID_SETTINGS, settings); fragment.setArguments(arguments); return fragment; }
From source file:com.akop.bach.fragment.AlertDialogFragment.java
public static AlertDialogFragment newInstance(int type, int code, String title, String message, long id, String param) {/*from w ww.java2 s . c o m*/ AlertDialogFragment f = new AlertDialogFragment(); // Supply num input as an argument. Bundle args = new Bundle(); args.putInt("code", code); args.putInt("type", type); args.putString("title", title); args.putString("message", message); args.putLong("id", id); args.putString("param", param); f.setArguments(args); return f; }
From source file:com.calgen.udacity.lego.ui.ArticleDetailFragment.java
public static ArticleDetailFragment newInstance(long itemId) { Bundle arguments = new Bundle(); arguments.putLong(ARG_ITEM_ID, itemId); ArticleDetailFragment fragment = new ArticleDetailFragment(); fragment.setArguments(arguments);/*w ww. ja v a2 s . c om*/ return fragment; }
From source file:com.google.android.apps.mytracks.fragments.ConfirmDialogFragment.java
public static ConfirmDialogFragment newInstance(int confirmId, boolean defaultValue, CharSequence message, long trackId) { Bundle bundle = new Bundle(); bundle.putInt(KEY_CONFIRM_ID, confirmId); bundle.putBoolean(KEY_DEFAULT_VALUE, defaultValue); bundle.putCharSequence(KEY_MESSAGE, message); bundle.putLong(KEY_TRACK_ID, trackId); ConfirmDialogFragment confirmDialogFragment = new ConfirmDialogFragment(); confirmDialogFragment.setArguments(bundle); return confirmDialogFragment; }
From source file:com.andryr.musicplayer.fragments.AlbumFragment.java
public static AlbumFragment newInstance(Album album) { AlbumFragment fragment = new AlbumFragment(); 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);//from www .ja v a 2s. c o m return fragment; }