dictionary - 在android中向谷歌地图添加按钮

标签 dictionary

我是安卓新手。我正在做一个项目作为我学术的一部分。我想在 Google Map android 的底部有几个按钮,就像在 waze android 应用程序中一样(抱歉,无法发布屏幕截图)。我根据以下链接尝试了一些事情 How to add buttons at top of map fragment API v2 layout .却没有得到想要的结果。

有人可以帮我进行正确的布局吗?感谢您的帮助。

最佳答案

试试这个:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.MapFragment" />

    <Button
        android:id="@+id/setRangeButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/setRange" />
</RelativeLayout>

关于dictionary - 在android中向谷歌地图添加按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22847621/

相关文章:

dictionary - 在 OCaml 中使用 Map.update

java - 迭代具有以下结构的 map

python - python 'dict'类型的源代码在哪里?

python - 通过键列表访问嵌套字典项?

值为指针的 C++ Map

c# - .NET 或 MySql 或其他解决方案,每天进行数百万次查找(以停止重复)

python - 从嵌套字典列表中获取 Pandas 数据框

node.js - 在类型上找不到参数类型为 'string'的索引签名

python - 将嵌套字典转换为数据框

dictionary - 在单个语句中初始化 Go map