Skip to content

Instantly share code, notes, and snippets.

@Sprajapati123
Created January 16, 2025 02:16
Show Gist options
  • Save Sprajapati123/b06deb5c79f4486bfc766c04b9e7c75e to your computer and use it in GitHub Desktop.
Save Sprajapati123/b06deb5c79f4486bfc766c04b9e7c75e to your computer and use it in GitHub Desktop.
sample_card.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/cardProducts"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:id="@+id/pName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Product Name" />
<TextView
android:id="@+id/pPRice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Product Price" />
<TextView
android:id="@+id/pDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Product Desc" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment