私はこのような画面を作成しようとしています。これが私の設計目標です。AndroidのGoogleマップで他のレイアウトとビューを実装する
私はMapFragment
とともにRelativeLayout
を使用しています。しかし、これは次の画面のようには見えません。私はこれを正しい方法で行うためのあなたの提案に感謝します。ここに私のコードは...
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<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="gps.finder.com.findermaterial.MapsActivity" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dip"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="#c8e6c9">
<TextView
android:id="@+id/details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="3"
android:padding="8dp"
android:text="Card View"
android:textColor="#222"
android:textStyle="bold"
android:textSize="22dp" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/details"
android:maxLines="3"
android:padding="8dp"
android:text="Card View"
android:textColor="#222"
android:textStyle="bold"
android:textSize="22dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:maxLines="3"
android:padding="8dp"
android:text="description"
android:textColor="#666"
android:textSize="14dp" />
</RelativeLayout>
</RelativeLayout>
どのように私はこれを行うことができますか?
ここにXMLコードを記入してください。あなたは今まで何をしていますか? –
@SagarNayak私のXMLコードを追加しました。それを確認してください、または私に有用なリンクを提案することができます。 – anuradha
は、マップを画面全体に表示させるために必要です。あなたの画面をいっぱいにしても、本当にそれを見ることができないからです。だから私はあなたが本当に目に見える限界に地図を保つことをお勧めします。 –