List of usage examples for android.os Bundle getLong
public long getLong(String key)
From source file:org.anhonesteffort.flock.registration.model.FlockAccount.java
public static Optional<FlockAccount> build(Bundle bundledAccount) throws JsonParseException { if (bundledAccount == null || bundledAccount.getString(KEY_ACCOUNT_ID) == null) return Optional.absent(); Integer planType = bundledAccount.getInt(KEY_SUBSCRIPTION_PLAN_TYPE); String serializedPlan = bundledAccount.getString(KEY_SUBSCRIPTION_PLAN); SubscriptionPlan subscriptionPlan = SubscriptionPlan.buildFromSerialized(planType, serializedPlan); return Optional.of(new FlockAccount(bundledAccount.getString(KEY_ACCOUNT_ID), bundledAccount.getInt(KEY_VERSION), bundledAccount.getString(KEY_SALT), bundledAccount.getString(KEY_PASSWORD_SHA512), bundledAccount.getString(KEY_STRIPE_CUSTOMER_ID), new Date(bundledAccount.getLong(KEY_CREATE_DATE)), bundledAccount.getBoolean(KEY_LAST_STRIPE_CHARGE_FAILED), bundledAccount.getBoolean(KEY_AUTO_RENEW_ENABLED), subscriptionPlan)); }
From source file:com.example.sergey.currentweather.ui.activity.DetailActivity.java
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail); Bundle bundle = getIntent().getExtras(); Long position = bundle.getLong("position"); nextStage(position);//from www. j a v a2 s .com }
From source file:com.cyanogenmod.eleven.adapters.ArtistDetailSongAdapter.java
@Override // LoaderCallbacks public Loader<List<Song>> onCreateLoader(int id, Bundle args) { onLoading();//from w w w . java 2 s .co m setSourceId(args.getLong(Config.ID)); final String selection = MediaStore.Audio.AudioColumns.ARTIST_ID + "=" + getSourceId(); return new SongLoader(mActivity, selection); }
From source file:com.cyanogenmod.eleven.adapters.AlbumDetailSongAdapter.java
@Override // LoaderCallbacks public Loader<List<Song>> onCreateLoader(int id, Bundle args) { onLoading();/*from w w w. ja v a 2s .c om*/ setSourceId(args.getLong(Config.ID)); return new AlbumSongLoader(mActivity, getSourceId()); }
From source file:com.silentcircle.contacts.interactions.GroupDeletionDialogFragment.java
protected void deleteGroup() { Bundle arguments = getArguments(); long groupId = arguments.getLong(ARG_GROUP_ID); getActivity().startService(ScContactSaveService.createGroupDeletionIntent(getActivity(), groupId)); if (shouldEndActivity()) { getActivity().finish();/* w ww . j av a2 s . c om*/ } }
From source file:com.jpventura.popularmovies.app.OverviewFragment.java
@Override public Loader<Cursor> onCreateLoader(int strategy, Bundle args) { MovieSelection selection = new MovieSelection().baseId(args.getLong(OverviewActivity.EXTRA_MOVIE_ID)); return new CursorLoader(getContext(), MovieColumns.CONTENT_URI, PROJECTION, selection.sel(), selection.args(), null);/*from w w w .ja v a2 s. c om*/ }
From source file:com.andryr.musicplayer.fragments.GenreFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = getArguments(); if (args != null) { mGenreId = args.getLong(PARAM_GENRE_ID); }/*from www.ja v a 2 s. c o m*/ }
From source file:com.nearnotes.OverflowDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle extras = getArguments(); final Long mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID); final int mSelection = extras.getInt("confirmSelection"); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); // Set the dialog title switch (mSelection) { case 0://from w w w .j av a2s . c o m builder.setTitle(R.string.check_clear); mWhich = 0; break; case 1: builder.setTitle(R.string.check_delete); mWhich = 1; break; case 2: builder.setTitle(R.string.check_not_saved); builder.setNegativeButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { } }); return builder.create(); } builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { mListener.onOptionSelected(mWhich, mRowId); // User clicked OK, so save the mSelectedItems results somewhere // or return them to the component that opened the dialog } }).setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { } }); return builder.create(); }
From source file:de.vanita5.twittnuker.fragment.support.SearchUsersFragment.java
@Override public Loader<List<ParcelableUser>> newLoaderInstance(final Context context, final Bundle args) { if (args == null) return null; final long account_id = args.getLong(EXTRA_ACCOUNT_ID); final String query = args.getString(EXTRA_QUERY); return new UserSearchLoader(context, account_id, query, mPage, getData()); }
From source file:com.android.timezonepicker.TimeZonePickerDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { long timeMillis = 0; String timeZone = null;/*from w ww . j a v a 2 s .co m*/ Bundle b = getArguments(); if (b != null) { timeMillis = b.getLong(BUNDLE_START_TIME_MILLIS); timeZone = b.getString(BUNDLE_TIME_ZONE); } boolean hideFilterSearch = false; if (savedInstanceState != null) { hideFilterSearch = savedInstanceState.getBoolean(KEY_HIDE_FILTER_SEARCH); } mView = new TimeZonePickerView(getActivity(), null, timeZone, timeMillis, this, hideFilterSearch); if (savedInstanceState != null && savedInstanceState.getBoolean(KEY_HAS_RESULTS, false)) { mView.showFilterResults(savedInstanceState.getInt(KEY_LAST_FILTER_TYPE), savedInstanceState.getString(KEY_LAST_FILTER_STRING), savedInstanceState.getInt(KEY_LAST_FILTER_TIME)); } return mView; }