2011-09-19 14 views

答えて

1

このようにRelativeLayoutを作成することができます。

ここは例です。

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <com.google.android.maps.MapView 
     xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview" 
     android:layout_width="fill_parent" android:layout_height="fill_parent" 
     android:clickable="true" android:apiKey="you key" /> 

    <ImageView android:id="@+id/cur_loc" android:layout_width="wrap_content" 
      android:layout_height="wrap_content" android:src="@drawable/cur_loc" 
      android:visibility="gone" android:padding="0dip" 
      android:layout_margin="0dip" android:background="#ffffff" /> 

    <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/track_dist_linear" 
     android:background="#ffffff" android:orientation="vertical"> 
     <TextView android:id="@+id/txt_msg" android:layout_width="fill_parent" android:layout_height="wrap_content" 
     android:textColor="#000000" android:text="Distance 0 km"/> 
     <TextView android:id="@+id/speed_msg" android:layout_width="fill_parent" android:layout_height="wrap_content" 
     android:textColor="#000000" android:text="Speed 0 kmph \ntime 0 sec"/> 
    </LinearLayout> 
    <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/track_dist_linear"> 
     <Button android:id="@+id/track_btn" android:text="Start" android:layout_width="wrap_content" 
     android:layout_height="wrap_content"/> 
     <Button android:id="@+id/show_track_btn" android:text="Show" android:layout_width="wrap_content" 
     android:layout_height="wrap_content"/> 
    </LinearLayout> 
</RelativeLayout> 
+0

は、まず、お返事ありがとうございました、私は十分に明確ではなかったことも役立ちます。私はoverlayitem追加する必要はありません(マーカー)が、ビュー(ボタン、テキストビュー..)とそれらをマップ上に配置するので、私はマップビューをアニメーションする場合移動するように –

+0

更新された投稿を確認します。ボタンやビューをオーバーレイを使用して追加する必要はないと思うのですが、同じオーバーレイを使用してマップ上にマーカーのようなボタンイメージを表示することができますので、マップ上を移動します – Pratik

関連する問題