List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.lambdasoup.quickfit.ui.SchedulesFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); Timber.d("activity created, initializing view binding"); schedulesAdapter = new SchedulesRecyclerViewAdapter(); schedulesAdapter.setOnScheduleInteractionListener(this); schedulesBinding.scheduleList.setAdapter(schedulesAdapter); ItemTouchHelper swipeDismiss = new ItemTouchHelper(new LeaveBehind() { @Override// w ww . j ava 2s. c o m public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { onRemoveSchedule(viewHolder.getItemId()); } }); swipeDismiss.attachToRecyclerView(schedulesBinding.scheduleList); schedulesBinding.scheduleList.addItemDecoration(new DividerItemDecoration(getContext(), true)); Bundle bundle = new Bundle(1); bundle.putLong(ARG_WORKOUT_ID, workoutId); getLoaderManager().initLoader(LOADER_SCHEDULES, bundle, this); }
From source file:com.example.android.ennis.barrett.popularmovies.DetailFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putLong(ID_KEY, mID); }
From source file:com.rappsantiago.weighttracker.profile.setup.NameBirthdayGenderFragment.java
@Override public Bundle getProfileData() { Bundle bundle = new Bundle(); bundle.putString(KEY_NAME, mTxtNameWrapper.getEditText().getText().toString()); bundle.putLong(KEY_BIRTHDAY, mBirthdayInMillis); bundle.putString(KEY_GENDER, mGender); return bundle; }
From source file:com.nextgis.maplibui.control.DateTime.java
@Override public void saveState(Bundle outState) { outState.putLong(ControlHelper.getSavedStateKey(mFieldName), mValue); if (mTimeDialog != null) mTimeDialog.dismiss();/* w w w .j a va 2s .c om*/ }
From source file:com.narkii.security.info.SecureDataFragment.java
@SuppressWarnings("deprecation") @Override// w w w. j a va 2 s. c om public void onActivityCreated(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onActivityCreated(savedInstanceState); initViews(); certiAdapter = ArrayAdapter.createFromResource(getActivity(), R.array.spinner_certificate_situ, android.R.layout.simple_spinner_item); certiAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); certificateSpinner.setAdapter(certiAdapter); safeTypeAdapter = new SimpleCursorAdapter(getActivity(), android.R.layout.simple_spinner_item, null, new String[] { SafetyPermitType.COLUMN_NAME }, new int[] { android.R.id.text1 }); safeTypeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); safeTypeSpinner.setAdapter(safeTypeAdapter); f2TypeAdapter = new SimpleCursorAdapter(getActivity(), android.R.layout.simple_spinner_item, null, new String[] { VarityType.COLUMN_NAME }, new int[] { android.R.id.text1 }); f2TypeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); f2TypeSpinner.setAdapter(f2TypeAdapter); getLoaderManager().initLoader(Constants.SPINNER_SAFETY_PERMIT_TYPE_ID, null, this); getLoaderManager().restartLoader(Constants.SPINNER_VARITY_TYPE_ID, null, this); long id = getArguments().getLong("enterpriseId", 0); if (id == 0) { } else { Bundle bundle = new Bundle(); bundle.putLong("id", id); getLoaderManager().restartLoader(Constants.ENTERPRISE_INFO_ID, bundle, this); getLoaderManager().restartLoader(Constants.FILING_ID, bundle, this); } }
From source file:com.guayaba.tapir.ui.fragments.GenreFragment.java
/** * {@inheritDoc}//from w w w . j a v a 2 s .c o m */ @Override public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) { mGenre = mAdapter.getItem(position); // Create a new bundle to transfer the artist info final Bundle bundle = new Bundle(); bundle.putLong(Config.ID, mGenre.mGenreId); bundle.putString(Config.MIME_TYPE, MediaStore.Audio.Genres.CONTENT_TYPE); bundle.putString(Config.NAME, mGenre.mGenreName); // Create the intent to launch the profile activity final Intent intent = new Intent(getActivity(), ProfileActivity.class); intent.putExtras(bundle); startActivity(intent); }
From source file:com.andrew.apollo.ui.fragments.GenreFragment.java
/** * {@inheritDoc}//from w w w .j a va 2s . c o m */ @Override public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) { mGenre = mAdapter.getItem(position); // Create a new bundle to transfer the artist info final Bundle bundle = new Bundle(); bundle.putLong(Config.ID, Long.valueOf(mGenre.mGenreId)); bundle.putString(Config.MIME_TYPE, MediaStore.Audio.Genres.CONTENT_TYPE); bundle.putString(Config.NAME, mGenre.mGenreName); // Create the intent to launch the profile activity final Intent intent = new Intent(getSherlockActivity(), ProfileActivity.class); intent.putExtras(bundle); startActivity(intent); }
From source file:com.mysmallcornerstudios.tempus.ui.MainActivity.java
private void selectItem(int position, long timerId, String timerName, String duration, int alarmCount) { final Bundle args = new Bundle(); args.putLong(ID, timerId); args.putString(NAME, timerName);/*from w ww. j a v a 2 s.c om*/ args.putString(DURATION, duration); args.putInt(ALARM_COUNT, alarmCount); final Fragment fragment = new TimerFragment(); fragment.setArguments(args); getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, fragment).commit(); // update selected item and title, then close the drawer timerList.setItemChecked(position, true); setTitle(timerName); drawerLayout.closeDrawer(timerList); }
From source file:com.facebook.login.LoginMethodHandler.java
protected void logWebLoginCompleted(String e2e) { String applicationId = loginClient.getPendingRequest().getApplicationId(); AppEventsLogger appEventsLogger = AppEventsLogger.newLogger(loginClient.getActivity(), applicationId); Bundle parameters = new Bundle(); parameters.putString(AnalyticsEvents.PARAMETER_WEB_LOGIN_E2E, e2e); parameters.putLong(AnalyticsEvents.PARAMETER_WEB_LOGIN_SWITCHBACK_TIME, System.currentTimeMillis()); parameters.putString(AnalyticsEvents.PARAMETER_APP_ID, applicationId); appEventsLogger.logSdkEvent(AnalyticsEvents.EVENT_WEB_LOGIN_COMPLETE, null, parameters); }
From source file:ca.ddaly.android.heart.Heart.java
/** * switch to new edit fragment for display/edit of a new record *///from w w w.ja v a2 s .c o m private void switchNewEditFrag(long id) { Bundle args = new Bundle(); args.putLong("id", id); myViewer = new EditFragment(); myViewer.setArguments(args); /* .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out, android.R.anim.fade_in, android.R.anim.fade_out) .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE) */ getSupportFragmentManager().beginTransaction().setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE) .replace(R.id.editfrag_container, myViewer).commit(); }