Skip to content

Instantly share code, notes, and snippets.

@anta40
Created September 21, 2022 12:25
Show Gist options
  • Save anta40/06c8f655defe738eceafc160b2a9cf81 to your computer and use it in GitHub Desktop.
Save anta40/06c8f655defe738eceafc160b2a9cf81 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.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"
android:layout_margin="5dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="4dp"
app:cardElevation="4dp"
app:cardMaxElevation="10dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_margin="4dp"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<TextView
android:text="1"
android:id="@+id/tvCountryID"
android:textSize="20sp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="India"
android:id="@+id/tvCountryName"
android:textSize="15sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="100"
android:id="@+id/tvCountryPopulation"
android:textSize="15sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<Button
android:id="@+id/btnEdit"
android:layout_gravity="center"
android:layout_margin="4dp"
android:text="EDIT"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" />
<Button
android:id="@+id/btnDelete"
android:layout_gravity="center"
android:layout_margin="4dp"
android:text="DELETE"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment