List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.noshufou.android.su.AppDetailsFragment.java
public static AppDetailsFragment newInstance(long index) { AppDetailsFragment fragment = new AppDetailsFragment(); Bundle args = new Bundle(); args.putLong("index", index); fragment.setArguments(args);//from w ww. ja va 2s . c o m return fragment; }
From source file:com.granita.tasks.QuickAddDialogFragment.java
/** * Create a {@link QuickAddDialogFragment} with the given title and initial text value. * /*from w ww.j a v a 2 s .co m*/ * @param titleId * The resource id of the title. * @param initalText * The initial text in the input field. * @return A new {@link QuickAddDialogFragment}. */ public static QuickAddDialogFragment newInstance(long listId) { QuickAddDialogFragment fragment = new QuickAddDialogFragment(); Bundle args = new Bundle(); args.putLong(ARG_LIST_ID, listId); fragment.setArguments(args); return fragment; }
From source file:com.freshdigitable.udonroad.TweetInputFragment.java
public static TweetInputFragment create(@TweetType int type, long statusId) { final Bundle args = new Bundle(); args.putInt("tweet_type", type); args.putLong("status_id", statusId); final TweetInputFragment tweetInputFragment = new TweetInputFragment(); tweetInputFragment.setArguments(args); return tweetInputFragment; }
From source file:amhamogus.com.daysoff.fragments.AddEventFragment.java
public static AddEventFragment newInstance(Date date) { AddEventFragment fragment = new AddEventFragment(); Bundle args = new Bundle(); args.putLong(ARG_CURRENT_DATE, date.getTime()); fragment.setArguments(args);//from w w w . j a v a2s . co m return fragment; }
From source file:can.yrt.onebusaway.ReportTripProblemFragment.java
static void show(SherlockFragmentActivity activity, ObaArrivalInfo arrival) { FragmentManager fm = activity.getSupportFragmentManager(); Bundle args = new Bundle(); args.putString(TRIP_ID, arrival.getTripId()); args.putString(STOP_ID, arrival.getStopId()); // We don't use the stop name map here...we want the actual stop name. args.putString(TRIP_NAME, arrival.getHeadsign()); args.putLong(TRIP_SERVICE_DATE, arrival.getServiceDate()); args.putString(TRIP_VEHICLE_ID, arrival.getVehicleId()); // Create the list fragment and add it as our sole content. ReportTripProblemFragment content = new ReportTripProblemFragment(); content.setArguments(args);//from w w w. ja va2 s.co m FragmentTransaction ft = fm.beginTransaction(); ft.replace(android.R.id.content, content); ft.addToBackStack(null); ft.commit(); }
From source file:com.hyperaware.conference.android.fragment.AgendaFragment.java
@NonNull public static AgendaFragment instantiate(@NonNull String title, long start_at_time) { final AgendaFragment fragment = instantiate(title); final Bundle args = fragment.getArguments(); args.putLong(ARG_START_AT_TIME, start_at_time); return fragment; }
From source file:com.granita.tasks.QuickAddDialogFragment.java
/** * Create a {@link QuickAddDialogFragment} with the given title and initial text value. * //from ww w . j a v a2 s. c o m * @param titleId * The resource id of the title. * @param initalText * The initial text in the input field. * @return A new {@link QuickAddDialogFragment}. */ public static QuickAddDialogFragment newInstance(ContentSet content) { QuickAddDialogFragment fragment = new QuickAddDialogFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_CONTENT, content); args.putLong(ARG_LIST_ID, -1); fragment.setArguments(args); return fragment; }
From source file:com.andryr.musicplayer.fragments.ArtistFragment.java
public static ArtistFragment newInstance(Artist artist) { ArtistFragment fragment = new ArtistFragment(); Bundle args = new Bundle(); args.putLong(PARAM_ARTIST_ID, artist.getId()); args.putString(PARAM_ARTIST_NAME, artist.getName()); args.putInt(PARAM_ALBUM_COUNT, artist.getAlbumCount()); args.putInt(PARAM_TRACK_COUNT, artist.getTrackCount()); fragment.setArguments(args);/*from www. j a v a2 s . co m*/ return fragment; }
From source file:com.ichi2.anki.dialogs.CustomStudyDialog.java
public static CustomStudyDialog newInstance(int id, long did, boolean jumpToReviewer) { CustomStudyDialog f = new CustomStudyDialog(); Bundle args = new Bundle(); args.putInt("id", id); args.putLong("did", did); args.putBoolean("jumpToReviewer", jumpToReviewer); f.setArguments(args);/*www . ja v a2 s . c om*/ return f; }
From source file:com.dabay6.android.apps.carlog.ui.fuel.fragments.FuelHistoryEditFragment.java
/** * Creates a new instance of {@link FuelHistoryEditFragment}. * * @param id The fuel history id to be loaded. * * @return An instance of {@link FuelHistoryEditFragment}. *///from w w w . j av a 2 s. com public static FuelHistoryEditFragment newInstance(final long vehicleId, final Long id) { final Bundle bundle = new Bundle(); final FuelHistoryEditFragment fragment = new FuelHistoryEditFragment(); bundle.putLong(PARAMS_VEHICLE_ID, vehicleId); if (id != null) { bundle.putLong(PARAMS_ENTITY_ID, id); } fragment.setArguments(bundle); return fragment; }