Untitled

 avatar
unknown
plain_text
a year ago
1.6 kB
2
Indexable
<?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="wrap_content"
    android:layout_height="wrap_content"
    app:cardCornerRadius="10dp"
    app:cardElevation="4dp">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_marginStart="10dp"
        android:layout_marginEnd="10dp"
        android:paddingBottom="10dp"
        android:layout_gravity="center"
        android:gravity="center">

        <ImageView
            android:id="@+id/imgProduct"
            android:layout_marginTop="5dp"
            android:layout_width="96dp"
            android:layout_height="96dp"
            android:src="@drawable/burger"
            app:civ_border_width="2dp"
            app:civ_border_color="@color/colorPrimary" />

        <TextView
            android:id="@+id/tvCategory"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="Hello World"
            android:maxLines="2"
            android:ellipsize="end"
            android:textColor="@color/black"
            android:textSize="15sp"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"/>
    </LinearLayout>
</androidx.cardview.widget.CardView>
Leave a Comment