Skip to content

Instantly share code, notes, and snippets.

@janishar
Created October 10, 2016 10:48
Show Gist options
  • Select an option

  • Save janishar/9784a9f5d4fd549912cfc2e8f38b96fb to your computer and use it in GitHub Desktop.

Select an option

Save janishar/9784a9f5d4fd549912cfc2e8f38b96fb to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="4dp"
app:cardElevation="1dp"
android:layout_margin="5dp"
app:cardBackgroundColor="@android:color/holo_blue_dark">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="20dp"
android:paddingTop="10dp"
android:paddingBottom="20dp"
android:gravity="left">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:cardCornerRadius="4dp"
app:cardElevation="1dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="60dp"
android:layout_height="80dp"
android:layout_gravity="top"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/titleTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="16sp"
android:typeface="sans"
android:textStyle="normal"/>
<TextView
android:id="@+id/captionTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="@android:color/white"
android:textSize="12sp"
android:typeface="sans"
android:textStyle="normal"/>
<TextView
android:id="@+id/timeTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="right"
android:textColor="@android:color/white"
android:textSize="12sp"
android:typeface="sans"
android:textStyle="normal"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment