Skip to content

Instantly share code, notes, and snippets.

@Mustufa786
Created August 4, 2019 12:10
Show Gist options
  • Save Mustufa786/19fc0ef8b1676fad027dff492c82dc06 to your computer and use it in GitHub Desktop.
Save Mustufa786/19fc0ef8b1676fad027dff492c82dc06 to your computer and use it in GitHub Desktop.
This is our list item what will hold each row of recyclerView.
<?xml version="1.0" encoding="utf-8"?>
<com.balysv.materialripple.MaterialRippleLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/parentLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:minHeight="?attr/actionBarSize"
android:orientation="horizontal">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/image"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:src="@drawable/photo_male_5" />
<View
android:layout_width="5dp"
android:layout_height="0dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:text="Mustufa Ansari"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#263238" />
<TextView
android:id="@+id/desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:maxLines="2"
android:text="@string/loremIpsum"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="#999999" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="#e6e6e6" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.balysv.materialripple.MaterialRippleLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment