【问题标题】:How Can make Toast.makeText in Google map?如何在 Google 地图中制作 Toast.makeText?
【发布时间】:2015-03-28 19:48:55
【问题描述】:

我想知道如何让'Toast.makeText`告诉我路径中城市的顺序

代码:

        shortest = TSP.tsp(Matrix);


        for(int i=0; i < 20 ; i++)
        {

            googleMap.addPolyline(new PolylineOptions().geodesic(true)
                            .add(new                   LatLng(placeLatitude[shortest[i]],placeLongitude[shortest[i]]))
                            .add(new LatLng(placeLatitude[shortest[i+1]],placeLongitude[shortest[i+1]]))
            );
        }

    }

【问题讨论】:

  • 请考虑为您的问题放置一个最小的代码示例,并将您的问题重新集中在您的问题上,人们不需要知道您的应用程序回答的目的是什么,只需要显示toast 覆盖谷歌地图,您提供的帮助您的代码太长了!
  • 你有没有在Android@dvhh 中使用google 地图的经验

标签: android google-maps android-toast


【解决方案1】:

Here 是关于 toast 的完整描述。而且我猜您可以将按顺序添加的城市记录在字符串数组中,然后运行 ​​for 循环将其附加到要显示在 toast 消息上的文本中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-04
    相关资源
    最近更新 更多