Adding list items
To keep things simple, we will create cards with a small image and two lines of text, similar to what we might find in a contact list. There is quite a lot of code to this layout, but it gives us the opportunity to apply Material Design spacing and text. Following is the complete listing with definitions that pertain particularly to material being highlighted:
<?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.CardView android:id="@+id/card_view" android:layout_width="match_parent" android:layout_height="wrap_content"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="...