pra*_*gai 5 android view widget map
我是Android应用程序的新开发者.我希望在我的应用程序中显示谷歌地图.我想在地图上显示android小部件.我可以显示像按钮,编辑文本框,文本视图等的android小部件.
我有设计代码,用于获取xml中的地图,如下所示
<com.google.android.maps.MapView
android:id="@+id/mapId"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="XYX_API_CODE_HERE_XYX"
/>
Run Code Online (Sandbox Code Playgroud)
请任何身体都可以帮助我
谢谢你的意见
Android SDK 附带了精美的演示:
如果您想查看示例代码,Google API 附加组件包含一个名为 MapsDemo 的示例应用程序,您可以将其加载到开发环境中并运行。该应用程序位于 Google API 目录中:
/add-ons/google_apis-API_LEVEL/samples/MapsDemo
编辑:
我一开始就误读了你的问题。你想做的事情最好用 来完成FrameLayout
。IE:
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/mapId"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="XYX_API_CODE_HERE_XYX"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<!-- Your other widgets (buttons, inputBoxes, etc) goes here -->
</LinearLayout>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1264 次 |
最近记录: |