Ich möchte eine Listenansicht wie dieses Bild erstellen. Also welches Layout wäre dafür geeignet?
Ich möchte ein listview
wie dieses Bild machen. Also welches Layout wäre dafür geeignet?
Ich verwende diesen XML-Code. Bitte sag mir wie ich wie dieses Bild komme. Zwischen zwei Listenpunkten ist der richtige Platz vorhanden.
list_row.xml
<?xml version="1.0" encoding="utf-8"?>
<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 -->
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/thumbnail"
android:layout_width="120dp"
android:layout_height="80dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
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" />-->
</RelativeLayout>
dies mit i wie dieses Bild bin immer.
Siehe https://developer.android.com/training/material/lists-cards.html – sJy
Ich möchte sagen, Vielen Dank. – user6313669
RecyclerView + CardView. ODER (weniger performant) ListView + benutzerdefiniertes Zeilenelement. –