Skip to content

Instantly share code, notes, and snippets.

@farooqkhan003
Created September 13, 2017 05:56
Show Gist options
  • Save farooqkhan003/6c424c3578e163cf3f9110671bcf2763 to your computer and use it in GitHub Desktop.
Save farooqkhan003/6c424c3578e163cf3f9110671bcf2763 to your computer and use it in GitHub Desktop.
<?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="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_margin="4dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageview"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/textview"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="8"
android:textSize="24sp"
tools:text="This is a sample text" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment