Android开发—通过Location获取Address说明.docVIP

  • 3
  • 0
  • 约5.19千字
  • 约 5页
  • 2016-12-26 发布于江苏
  • 举报

Android开发—通过Location获取Address说明.doc

我们获取Location的目的之一肯定是有获取这个位置的详细地址,而我们有了Location在来获取Address就相对简单多了,因为 GoogleApi已经封装好了方法,我们只需呀通过Location获取GeoPoint,然后在通过GeoPoint来获取我们想要的 Address.下面是我做的一个简单的Demo. 第一步新建一个Android工程LocationDemo,注意这里选用的是(Google APIs),下面是文件目录结构: 第二步: 修改main.xml(相比第十四节增加了一个address的TextView),代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/longitude android:layout_width=fill_pare

文档评论(0)

1亿VIP精品文档

相关文档