Skip to content

Instantly share code, notes, and snippets.

@vikasmain
Created January 13, 2022 12:20
Show Gist options
  • Save vikasmain/084d14025151631ec4610d50259fcf1f to your computer and use it in GitHub Desktop.
Save vikasmain/084d14025151631ec4610d50259fcf1f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:cardCornerRadius="16dp"
app:cardElevation="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:strokeColor="@android:color/darker_gray"
app:strokeWidth="1dp">
<RelativeLayout
android:layout_width="match_parent"
android:padding="8dp"
android:layout_height="wrap_content">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:textColor="@android:color/holo_orange_dark"
android:textStyle="bold"
tools:text="Spider man" />
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:textColor="@android:color/holo_green_dark"
tools:text="Spider man description for the movie" />
<TextView
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/description"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:textColor="@android:color/holo_blue_dark"
android:textStyle="bold"
tools:text="4.5" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment