1 / 8
文档名称:

Android开发教程Location获取Address.docx

格式:docx   页数:8页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Android开发教程Location获取Address.docx

上传人:yzhqw888 2016/6/7 文件大小:0 KB

下载得到文件列表

Android开发教程Location获取Address.docx

相关文档

文档介绍

文档介绍:IT 在线教育平台———麦子学院: roid 开发中,我们一般通过 Location 获取 Address ,由于 GoogleApi 已经封装好了方法,我们只需通过 Location 获取 GeoPoint ,然后在通过 GeoPoint 来获取我们想要的 Address 。下面是一个简单的 Demo 实例。第一步:新建一个 Android 工程 LocationDemo ,注意这里选用的是(Google APIs) ,下面是文件目录结构: 第二步:修改 ( 相比第十四节增加了一个 address 的 TextView) ,代码如下: <?xml version="" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas./apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/longitude" IT 在线教育平台———麦子学院: roid:layout_width="fill_parent" android:layout_height="wrap_content" android:text="longitude:" /> <TextView android:id="@+id/latitude" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="latitude:" /> <TextView android:id="@+id/address" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> 第三步:修改 ( 增加了两个方法) 代码如下: .; import ; import ; .; IT 在线教育平台———麦子学院: ort ; import ; import ; import ; import ; import ; import ; import ; public class LocationDemo extends Activity { private TextView longitude; private Text