【发布时间】:2018-02-22 09:19:48
【问题描述】:
我有一个谷歌地图,这是在开始一个新项目时创建地图活动时的默认布局:
<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="com.xxxxx.xxxxx.xxxxx.xxxxx.MapsActivity" />
当我进入设计视图时,我希望能够将一个按钮拖到地图/片段上。但看起来这种行为是不允许的。
不能将 UI 组件拖到地图上吗?这与iOS不同。
如果是这种情况,我会使用线性布局,然后在其中包含片段和按钮吗?
谢谢。
【问题讨论】: