Ich versuche, einen Bildschirm wie diesen zu erstellen. Das ist mein Designziel.Implementieren anderer Layouts und Ansichten auf Google Map in Android
Ich verwende RelativeLayout
zusammen mit dem MapFragment
. Aber das sieht nicht wie der folgende Bildschirm aus. Ich schätze Ihre Vorschläge, dies in der richtigen Weise zu tun. Hier ist mein Code ...
<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>
Kann mir jemand sagen, wie kann ich das tun?
poste deinen XML-Code hier. was hast du bis jetzt gemacht? –
@SagarNayak Ich habe meinen XML-Code hinzugefügt. Bitte überprüfen Sie es oder Sie können mir nützliche Links vorschlagen. – anuradha
ist dies notwendig, damit Ihre Karte den gesamten Bildschirm ausfüllt. Denn selbst wenn es Ihren Bildschirm füllt, können Sie es nicht wirklich sehen. Also schlage ich vor, dass Sie die Karte bis zum Limit halten, wo sie wirklich sichtbar ist. –