Ich möchte eine Karte für die Auflistung machen. Aber ich bekomme keine richtige Sichtweise.Ich möchte eine Karte für die Auflistung machen. Aber ich bekomme keine richtige Sicht
Ich möchte Bild auf der linken Seite anzeigen. Auf der rechten Seite des Bildes möchte ich den Namen des Hotels, den Bereich, die Bewertung, die Küche anzeigen.
Aber alles überschneidet sich nun über diesen Code.
Kann mir jemand helfen? Ich lade Bild hoch, was ich von diesem Code gebrauche.
siehe im Bild Name des Hotels, Gebiet, Bewertung, Küche überlappt sich. Wie löst man das? Dies ist der Screenshot, was ich will durch Kartenansicht
list_row.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
>
<!--<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/list_row_selector"
android:padding="8dp" >-->
<!-- Thumbnail Image -->
<android.support.v7.widget.CardView
android:id="@+id/ly_root"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FEFEFE"
android:layout_margin="8dp"
app:cardCornerRadius="4dp">
<!--<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp">-->
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/thumbnail"
android:layout_width="120dp"
android:layout_height="80dp"
android:scaleType="centerCrop"
android:layout_marginRight="8dp" />
<!-- Restaurant name -->
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/thumbnail"
android:textSize="@dimen/title"
android:textStyle="bold" />
<TextView
android:id="@+id/area"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/name"
android:textColor="#D2691E"
android:layout_toRightOf="@+id/thumbnail"
android:textSize="@dimen/rating" />
<!-- Rating -->
<TextView
android:id="@+id/average_ratings"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/area"
android:textColor="#D2691E"
android:layout_toRightOf="@+id/thumbnail"
android:textSize="@dimen/rating" />
<TextView
android:id="@+id/cuisine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/average_ratings"
android:textColor="#D2691E"
android:layout_toRightOf="@+id/thumbnail"
android:textSize="@dimen/rating" />
<!-- Genre -->
<!-- <TextView
android:id="@+id/genre"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/rating"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/thumbnail"
android:textColor="@color/genre"
android:textSize="@dimen/genre" />-->
<!--
<!– Release Year –>
<TextView
android:id="@+id/releaseYear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:textColor="@color/year"
android:textSize="@dimen/year" />-->
</android.support.v7.widget.CardView>
</LinearLayout>
Verwenden Sie eine Kombination aus linearen Layouts in Ihrem Kartenlayout. Es wird helfen, da das Kartenlayout selbst die Anordnung der Ansichten nicht kontrollieren kann –