【发布时间】:2019-01-10 15:52:28
【问题描述】:
所以我有一个GoogleMap 使用我的 API 密钥。我可以找到我的位置,但打开应用程序时没有任何按钮。如果我尝试通过 android 设计布局单击并拖动任何按钮,则不允许这样做。
这就是我的activity_maps.xml 的样子:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapsActivity" />
查看旁边的 android 手机视图时,它只是说,我不确定如何在此地图顶部添加按钮,如果可能的话,甚至在其下方添加按钮。
我知道ConstraintLayout 和FrameLayout,但是在添加其他代码时,我只是得到“多根错误”并且无法实现我想要的。
谁能帮帮我?
【问题讨论】:
标签: android xml android-studio button google-api