【发布时间】:2015-02-20 13:01:07
【问题描述】:
大家好
首先,对不起我的英语不好
我先把你放在位置上:
我在 Eclipse 中使用适用于 Android 的 Java 代码。
我的应用程序需要在片段中显示地图(Google Maps V2)以显示跑步者的位置。地图显示已经实现了。
这是我的问题:我使用 FrameLayout 元素,它包含我的地图,因此是整个页面,但是,我的目标是在地图上显示一个位于底部居中的文本框。我尝试使用 Foreground 属性选项来设置我的文本,但它不起作用(到达地图页面时应用程序崩溃)。
这是我的代码 fragment_carte:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mapFrameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="@id/txtViewCoureur"
tools:context=".CarteFragment" >
</FrameLayout>
我无法发布图片来向您展示我想要的东西,因为这是我的第一篇文章
在提问之前我在这个论坛上尝试了很多解决方案
感谢您的帮助!
【问题讨论】:
标签: java android google-maps android-framelayout foreground