Ich baue eine App, die eine Kartenansicht und eine Textansicht benötigt, um eine Orts-/Ortsauswahl zu ermöglichen. Es ist wie "Uber", wo die Kartenansicht den gesamten Bildschirm ausfüllt und dann die Editext-Ansichten zum Auswählen eines Ortes über der Kartenansicht eingeblendet werden. Das Problem ist, dass meine Design-XML-Datei die Textansichten "hinter" der Mapansicht platziert, sodass sie von der Map abgedeckt und nicht sichtbar sind. Wie kann ich es so machen, dass sie über der Kartenansicht erscheinen? während die Kartenansicht immer noch 100% der Bildschirmhöhe abdeckt? Meine XML-Datei ist unten dargestellt:Place EditText/TextView über MapView Android
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:textColor="@color/colorPrimary"
android:text="Pickup Location"
android:id="@+id/pickup"
android:textSize="15sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:textColor="@color/colorPrimary"
android:text="Drop Location"
android:id="@+id/drop"
android:textSize="15sp"
android:layout_alignParentLeft="true"
android:layout_below="@id/pickup"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ride_start"
android:layout_margin="10dp"
android:textSize="15sp"
android:visibility="gone"
android:textColor="@color/colorPrimary"
android:layout_below="@+id/drop"
android:text="Start"/>
</LinearLayout>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
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="MainActivity"
/>
<LinearLayout
android:layout_width="match_parent"
android:id="@+id/info"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="#F8CA2B"
android:gravity="center_vertical" >
<TextView
android:id="@+id/totaldistance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:textColor="#000" />
<View
android:layout_width="2dp"
android:layout_height="25dp"
android:layout_marginLeft="10dp"
android:background="#fff" />
<TextView
android:id="@+id/cost"
android:padding="3dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000" />
</LinearLayout>
Dank ysl ich oben mit Vij Antwort ging, weil ich es zum ersten Mal sah. Danke für Ihre Zeit – ewom2468
Wenn Sie meine Antwort nützlich fanden, dann können Sie sie als akzeptiert markieren. – YoLo