【发布时间】:2018-02-27 07:13:18
【问题描述】:
地图和片段
这是我的设计 图片
我有两个片段。FirstFragment -> 地图和 SecondFragment -> 天气
我从下面的代码中的第一个片段获取纬度和经度:
mPlace.setLatlng(place.getLatLng());
在 SecondFragment 中,我在此代码上执行纬度和经度:
asyncTask.execute("10.873873","78.818729");
问题:我想将经纬度从我的 FirstFragment 传递到 SecondFragment。
我尝试使用带有参数的 Bundle 来传递数据。它不起作用。
【问题讨论】:
-
传递纬度和经度与传递其他任何东西没有什么不同。
-
使用 bundle 传递我的数据不起作用
标签: java android google-maps android-studio android-fragments