【问题标题】:Android: Button at the corner of mapsAndroid:地图角落的按钮
【发布时间】:2011-10-09 05:09:21
【问题描述】:

我想在我的 Android 地图右上角创建一个按钮(必须一直呆在那里,即使我在地图中移动)。点按时地图应转到卫星视图,再次点按时应返回街景。

我有街景和地图视图的代码,我只想知道如何创建一个始终位于右上角的按钮。

谢谢

【问题讨论】:

  • 谢谢 Yashwanth。但我有点困惑。我是安卓新手。您能否详细说明并告诉我在哪里编写此代码?我应该在 Manifest 文件还是 main.xml 文件中执行此操作?请帮忙。

标签: android button maps


【解决方案1】:
<RelativeLayout>
<Button
   android:layout_alignParentRight="true"
   android:layout_alignParentTop="true"
/>
// place your other map or street view here.

</RelativeLayout>

使用这个布局。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-10-14
    • 1970-01-01
    • 1970-01-01
    • 2019-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多