Activity如何获取BroadcastReceiver从服务器请求回来的值 本帖最后由 speshowfeng 于 2014-07-02 14:46:09 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public void onResponse(Response<?> response) {progressDialog.hide();Location loc = (Location) response.getData();// String x = loc.getMapXcord()+"";// String y = loc.getMapYcord()+"";// Log.e("地图的坐标",x+"::::::::"+y);// Intent locValue = new Intent();// locValue.putExtra(x, "xValue");// locValue.putExtra(y, "yValue");showLocation(loc);mothed(loc);}}); public void mothed(Location loc ){ }这样写不可以? 没看明白你想做什么。 我就是想把那个onResponse方法里面的loc拿出来,在下面的那个mothed方法里使用,你那样正好相反了,我要在mothed这个方法里判断一下那个loc是不是在一定的范围内, 求问一个简单布局的实现 post 请求时有时会长时间阻塞 android 离线地图开发求指导 Android的View类能和EditText用到一起吗 Java FileNotFoundException 请教OnKeyListener触发间隔 android 里面观察者的实现是不是本身就是异步的? 关于Android拍照的一个问题 Android中计算点击焦点区域的问题,大神路过帮助一把吧! Android微信客户端菜单选项中的横线如何实现 关于Android camera后台运行的问题 新手请教安卓下怎样安装svn命令?
public void onResponse(Response<?> response) {
progressDialog.hide();
Location loc = (Location) response.getData();
// String x = loc.getMapXcord()+"";
// String y = loc.getMapYcord()+"";
// Log.e("地图的坐标",x+"::::::::"+y);
// Intent locValue = new Intent();
// locValue.putExtra(x, "xValue");
// locValue.putExtra(y, "yValue");
showLocation(loc);
mothed(loc);
}
});
public void mothed(Location loc ){
}这样写不可以? 没看明白你想做什么。
我就是想把那个onResponse方法里面的loc拿出来,在下面的那个mothed方法里使用,你那样正好相反了,我要在mothed这个方法里判断一下那个loc是不是在一定的范围内,