List of usage examples for android.os Bundle getSerializable
@Override
@Nullable
public Serializable getSerializable(@Nullable String key)
From source file:com.vehicletracking.VehicleInfoDialog.java
@Nullable @Override/*from ww w.j av a 2s. c o m*/ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (view != null) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) parent.removeView(view); } try { view = inflater.inflate(R.layout.dialog_vehicle_info, container, false); } catch (InflateException e) { Log.d("Error", "Inflate Exception", e); } Bundle args = getArguments(); vehicle = (Vehicle) args.getSerializable("Vehicle"); TextView vehicleType = (TextView) view.findViewById(R.id.vehicle_type); vehicleType.setText(vehicle.getDeviceType()); TextView licensePlate = (TextView) view.findViewById(R.id.vehicle__license_plate); licensePlate.setText(vehicle.getLicensePlate()); FragmentManager fm = getChildFragmentManager(); mapFragment = (SupportMapFragment) fm.findFragmentByTag("mapFragment"); if (mapFragment == null) { mapFragment = new SupportMapFragment(); FragmentTransaction ft = fm.beginTransaction(); ft.add(R.id.vehicle_last_seen_container, mapFragment, "mapFragment"); ft.commit(); } mapFragment.getMapAsync(this); return view; }
From source file:com.robwilliamson.healthyesther.edit.ScoreActivity.java
@Override protected void resumeFromIntentExtras(@Nonnull Bundle bundle) { HealthScoreTable.Row row = (HealthScoreTable.Row) bundle .getSerializable(HealthDatabase.HEALTH_SCORE_TABLE.getName()); EditScoreFragment editScoreFragment = getScoreFragment(); if (editScoreFragment != null && row != null) { editScoreFragment.setRow(row);//from ww w . j a v a 2 s. c o m } }
From source file:ca.teyssedre.mailmap.views.MailListFragment.java
private void RestoreView(Bundle bundle) { if (bundle != null) { mails = (List<MailMessage>) bundle.getSerializable(MAIL_ITEMS); publishData();/*w w w . ja va2 s . c om*/ } else { displayLoading(); // TODO: go fetch emails of current account } }
From source file:com.jjoseba.podemosquotes.fragment.QuoteDialog.java
@NonNull @Override/*from w w w . ja v a 2s. co m*/ public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); Bundle args = getArguments(); quote = (Quote) args.getSerializable(DIALOG_QUOTE); soundPlayed = false; builder.setView(inflater.inflate(R.layout.fragment_quote_dialog, null)); return builder.create(); }
From source file:de.schildbach.wallet.ui.ArchiveBackupDialogFragment.java
@Override public Dialog onCreateDialog(final Bundle savedInstanceState) { final Bundle args = getArguments(); final File backupFile = (File) args.getSerializable(KEY_FILE); final String path; final String backupPath = backupFile.getAbsolutePath(); final String storagePath = Constants.Files.EXTERNAL_STORAGE_DIR.getAbsolutePath(); if (backupPath.startsWith(storagePath)) path = backupPath.substring(storagePath.length()); else//from w w w . j a v a 2 s . com path = backupPath; final DialogBuilder dialog = new DialogBuilder(activity); dialog.setMessage(Html.fromHtml(getString(R.string.export_keys_dialog_success, path))); dialog.setPositiveButton(WholeStringBuilder.bold(getString(R.string.export_keys_dialog_button_archive)), new DialogInterface.OnClickListener() { @Override public void onClick(final DialogInterface dialog, final int which) { archiveWalletBackup(backupFile); } }); dialog.setNegativeButton(R.string.button_dismiss, null); return dialog.create(); }
From source file:li.klass.fhem.appwidget.view.widget.base.otherWidgets.OtherWidgetsFragment.java
@Override public void setArguments(Bundle args) { super.setArguments(args); widgetSize = (WidgetSize) args.getSerializable(APP_WIDGET_SIZE); widgetClickedCallback = (OnWidgetClickedCallback) args.getSerializable(ON_CLICKED_CALLBACK); }
From source file:com.auth0.lock.fragment.BaseTitledFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Lock lock = Lock.getLock(getActivity()); client = lock.getAuthenticationAPIClient(); bus = lock.getBus();// www. j av a 2 s. co m final Bundle arguments = getArguments(); authenticationParameters = arguments != null ? (Map<String, Object>) arguments.getSerializable(AUTHENTICATION_PARAMETER_ARGUMENT) : null; useEmail = arguments == null || arguments.getBoolean(AUTHENTICATION_USES_EMAIL_ARGUMENT); }
From source file:com.chrynan.guitartuner.PitchFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = getArguments(); note = (Note) args.getSerializable("note"); x = args.getFloat("x", -1); y = args.getFloat("y", -1); }
From source file:de.uni.stuttgart.informatik.ToureNPlaner.UI.Fragments.InfoFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // If we get created for the first time we get our data from the intent Bundle data = savedInstanceState != null ? savedInstanceState : getActivity().getIntent().getExtras(); session = (Session) data.getSerializable(Session.IDENTIFIER); }
From source file:com.simplaapliko.trips.presentation.fragment.SelectDateDialog.java
private void initializeState() { mCalendar = Calendar.getInstance(); Bundle args = getArguments(); if (args != null) { Date date = (Date) args.getSerializable(DATE_KEY); initializeCalendar(date);/* ww w .j a v a 2 s . c o m*/ } }