嗨,这是我的listview onClicklister。如何将豆类一项活动传递给Android上的另一项活动
当我点击列表中的项目,我通过它从bean类一个活动越来越像下面。另一项活动ArrayList中,
,但我想知道我们可以通过bean类下一个活动?
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);
}
});
如果我通过“路由Bean”,我得到下一个活动的值。
是否可以传递bean类?
看[这里] [1]。有很多方法可以做到这一点。 [1]:http://stackoverflow.com/questions/11679574/app-design-pass-date-through-intents-or-use-singletons/11679728#11679728 – 2012-07-27 02:56:56