List of usage examples for android.os Bundle putLong
public void putLong(@Nullable String key, long value)
From source file:com.mifos.mifosxdroid.ClientActivity.java
private void setFragment() { FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); ClientFragment fragment = new ClientFragment(); Bundle arguments = new Bundle(); arguments.putLong("group_id", groupId); fragment.setArguments(arguments);/*from w w w . jav a 2s . c o m*/ fragmentTransaction.replace(R.id.global_container, fragment).commit(); }
From source file:com.github.mobile.ui.project.ProjectPagerAdapter.java
@Override public Fragment getItem(final int position) { ProjectColumnFragment fragment = new ProjectColumnFragment(); Bundle args = new Bundle(); args.putLong(EXTRA_PROJECT_COLUMN, columns.get(position).id); fragment.setArguments(args);//from www . jav a2s . com return fragment; }
From source file:com.inovex.zabbixmobile.adapters.ChecksApplicationsPagerAdapter.java
@Override protected Fragment getItem(int position) { ChecksApplicationsPage p = new ChecksApplicationsPage(); Bundle args = new Bundle(); args.putLong("applicationID", getObject(position).getId()); p.setArguments(args);// ww w. j av a 2 s. c o m return p; }
From source file:com.facebook.AuthorizationClient.java
static Bundle newAuthorizationLoggingBundle(String authLoggerId) { // We want to log all parameters for all events, to ensure stability of columns across different event types. Bundle bundle = new Bundle(); bundle.putLong(EVENT_PARAM_TIMESTAMP, System.currentTimeMillis()); bundle.putString(EVENT_PARAM_AUTH_LOGGER_ID, authLoggerId); bundle.putString(EVENT_PARAM_METHOD, ""); bundle.putString(EVENT_PARAM_LOGIN_RESULT, ""); bundle.putString(EVENT_PARAM_ERROR_MESSAGE, ""); bundle.putString(EVENT_PARAM_ERROR_CODE, ""); bundle.putString(EVENT_PARAM_EXTRAS, ""); return bundle; }
From source file:com.glanznig.beepme.ViewSamplePagerAdapter.java
@Override public Fragment getItem(int position) { long sampleId = items.get(position).longValue(); Fragment fragment = new ViewSampleFragment(); Bundle args = new Bundle(); args.putLong("sampleId", sampleId); fragment.setArguments(args);/*from ww w. j av a2s. co m*/ return fragment; }
From source file:com.digiplex.extra.grantpermissiondemo.ContactActivity.java
@Override public void onContactNameSelected(long contactId) { /* Now that we know which Contact was selected we can go to the details fragment */ Fragment detailsFragment = new ContactDetailsFragment(); Bundle args = new Bundle(); args.putLong(SELECTED_CONTACT_ID, contactId); detailsFragment.setArguments(args);//from ww w. j a v a 2 s.com FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); // Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack transaction.replace(R.id.fragment_container, detailsFragment); transaction.addToBackStack(null); // Commit the transaction transaction.commit(); }
From source file:com.codinguser.android.contactpicker.ContactsPickerActivity.java
/** * Callback when the contact is selected from the list of contacts. * Loads the {@link ContactDetailsFragment} *//*w w w . jav a 2s . c o m*/ @Override public void onContactNameSelected(long contactId) { /* Now that we know which Contact was selected we can go to the details fragment */ Fragment detailsFragment = new ContactDetailsFragment(); Bundle args = new Bundle(); args.putLong(ContactsPickerActivity.SELECTED_CONTACT_ID, contactId); detailsFragment.setArguments(args); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); // Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack transaction.replace(R.id.fragment_container, detailsFragment); transaction.addToBackStack(null); // Commit the transaction transaction.commit(); }
From source file:com.nononsenseapps.feeder.ui.FeedFragment.java
/** * Returns a new instance of this fragment *//*from w w w . ja v a 2 s .c om*/ public static FeedFragment newInstance(long id, String title, String url, String tag) { FeedFragment fragment = new FeedFragment(); Bundle args = new Bundle(); args.putLong(ARG_FEED_ID, id); args.putString(ARG_FEED_TITLE, title); args.putString(ARG_FEED_URL, url); args.putString(ARG_FEED_TAG, tag); fragment.setArguments(args); return fragment; }
From source file:com.piusvelte.cloudset.android.ConfirmDialog.java
@Override public void onSaveInstanceState(Bundle state) { super.onSaveInstanceState(state); state.putLong(EXTRA_DEVICE_ID, deviceId); }
From source file:com.github.jvanhie.discogsscrobbler.ReleaseTracklistActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_release_tracklist); // Show the Up button in the action bar. getSupportActionBar().setDisplayHomeAsUpEnabled(true); // savedInstanceState is non-null when there is fragment state // saved from previous configurations of this activity // (e.g. when rotating the screen from portrait to landscape). // In this case, the fragment will automatically be re-added // to its container so we don't need to manually add it. // For more information, see the Fragments API guide at: ///*from ww w. j a v a2 s . com*/ // http://developer.android.com/guide/components/fragments.html // if (savedInstanceState == null) { // Create the tracklist fragment and add it to the activity // using a fragment transaction. Bundle arguments = new Bundle(); arguments.putLong(ReleaseTracklistFragment.ARG_ITEM_ID, getIntent().getLongExtra(ReleaseTracklistFragment.ARG_ITEM_ID, 0)); arguments.putBoolean(ReleaseTracklistFragment.HAS_MENU, true); ReleaseTracklistFragment fragment = new ReleaseTracklistFragment(); fragment.setArguments(arguments); getSupportFragmentManager().beginTransaction().add(R.id.release_tracklist_container, fragment).commit(); } }