Jak przekazać jedną czynność klasy bean do innej aktywności na Androidzie
Cześć, to jest mój listview onClicklister.
kiedy klikam element listy, przekazuję arraylistę, który przenosi z klasy fasoli jedną aktywność do innej aktywności, jak poniżej.,
Ale chcę wiedzieć, czy możemy przekazać klasę fasoli do następnej aktywności?
listViewRoutes.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
RouteBean bean = routeList.get(arg2);
ArrayList<Double> fromLatitude = bean.getFromLatitude();
ArrayList<Double> fromLongitude= bean.getFromLongitude();
ArrayList<Double> toLatitude = bean.getToLatitude();
ArrayList<Double> toLongitude= bean.getToLongitude();
Intent intent =new Intent("MapActivityView");
intent.putExtra("fromLon", fromLongitude);
intent.putExtra("fromLat", fromLatitude);
intent.putExtra("toLat", toLatitude);
intent.putExtra("toLon", toLongitude);
startActivity(intent);
}
});
jeśli przejdę przez „Route Bean”, otrzymam wartości przy następnej aktywności.
Czy można przejść klasę fasoli?