2011-03-03 38 views
0

在我的应用我有MapView类,我想表现出一个TextView,也是一个按钮的距离,如何显示TextView,MapView上的按钮(重叠在上面)..?

我做this.and试过这种.. http://www.anddev.org/post3452.html#p3452

问题是>>>>

我想说明的TextView和按钮经过地图视图.. 这样我就可以以全Screen..with其他项目在它的MapView(我们可以看到通过的TextView地图)..

任何规格需要请在xml文件中完成.. ??

Please..Reply我..谢谢 推进You..in

回答

7

是的,你可以做到这一点。

对于如:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" android:layout_height="fill_parent"> 

    <com.google.android.maps.MapView 
     android:id="@+id/mapView" android:layout_width="fill_parent" 
     android:layout_height="fill_parent" android:enabled="true" 
     android:layout_centerInParent="true" android:clickable="true" 
     android:apiKey="your api key" /> 

    <Button android:layout_width="wrap_content" 
     android:layout_height="wrap_content" android:text="Click" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentBottom="true" android:id="@+id/clickBtn" /> 

</RelativeLayout> 
+0

感谢罗希特和特别Mathew..for Replying..I得到了solution..thanks..I将使用该透明箭标导航太... – Hanry 2011-03-03 10:59:30

0

创建与RelativeLayout的布局,并在嵌入在地图视图。一旦设置,根据需要设置组件的相对位置。

相关问题