android - 如何向 Google Map Android API v2 添加自定义 Controller (如按钮)?

标签 android android-maps-v2

有人可以告诉我如何向 Google Map Android API V2 添加自定义 Controller (如按钮)吗?我搜索了很多,看了看https://developers.google.com/maps/documentation/android/intro ,但我在这方面找不到任何东西。我之前在网络上使用 Javascript 做过同样的事情,比如向 map 添加 DIV。对于 Android,我找不到任何东西。

最佳答案

看这个 xml 会将您的 Layout 放在您将在 RelativeLayout 中使用的任何 View 的底部

  <RelativeLayout
        android:id="@+id/footer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="#FC0"
        android:gravity="center" >

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:text="Fixed Footer"
            android:textColor="#000"
            android:textSize="20sp" />
    </RelativeLayout>

关于android - 如何向 Google Map Android API v2 添加自定义 Controller (如按钮)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21717567/

相关文章:

Android独有的闪屏: how to make it fill screen?

android - 谷歌地图标记未显示

android - 如果彼此相等则更改 textViews

c# - UWP WebView 等效于 shouldOverrideUrlLoading Android

Android 解析主机

android - 在 ActionBar 中自定义 MenuItem 的背景

android - 在google map static api中绘制圆形路径

android map v2 不会在 Debug模式下显示

android - 如何正确初始化 map ?

Android 使用方位映射 V2 newLatLngBounds