Android开发教程Location获取Address.pdfVIP

  • 44
  • 0
  • 约4.09千字
  • 约 8页
  • 2022-05-22 发布于江苏
  • 举报
IT在线教育平台———麦子学院: android开发中,我们一般通过Location获取Address ,由于GoogleApi已经封装好了 方法,我们只需通过Location获取GeoPoint,然后在通过GeoPoint来获取我们想要的 Address。下面是一个简单的Demo实例。 第一步:新建一个Android工程LocationDemo,注意这里选用的是(GoogleAPIs) ,下 面是文件目录结构: 第二步:修改main.xml(相比第十四节增加了一个address的TextView) ,代码如下: ?xmlversion=1.0encoding=utf-8? LinearLayoutxmlns:android=/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/longitude IT在线教育平台———麦子学院: android:layout_width=fill_parent android:layout_height=wrap_content android:text=longitude: / Te

文档评论(0)

1亿VIP精品文档

相关文档