Cardview

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardElevation="8dp"

tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="16dp"
>

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="593dp"
android:layout_height="354dp"
android:layout_marginVertical="6dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="24dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@color/cardview_shadow_end_color"
tools:ignore="MissingConstraints">

<ImageView
android:id="@+id/imageView3"
android:layout_width="399dp"
android:layout_height="wrap_content"
android:adjustViewBounds="false"
android:background="#FFFFFF"
android:cropToPadding="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/wheat" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="90dp"
android:layout_marginTop="5dp"
android:background="@color/white"
android:orientation="horizontal"
>

<TextView
android:id="@+id/tvCropname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@color/white"
android:text="Crop name: "
android:textColor="@color/black"
android:textSize="30dp" />

<TextView
android:id="@+id/tvname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@color/white"
android:text="Wheat"
android:textColor="@color/black"
android:textSize="22dp" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="90dp"
android:background="@color/white"
android:orientation="horizontal">

<TextView
android:id="@+id/tvCropQuant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@color/white"
android:text="Quantity: "
android:textColor="@color/black"
android:textSize="30dp" />

<TextView
android:id="@+id/tvQuantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@color/white"
android:text="25"
android:textColor="@color/black"
android:textSize="22dp" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="90dp"
android:background="@color/white"
android:orientation="horizontal">

<TextView
android:id="@+id/tvCropPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@color/white"
android:text="Price/kg "
android:textColor="@color/black"
android:textSize="30dp" />

<TextView
android:id="@+id/tvPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@color/white"
android:text="700Rs"
android:textColor="@color/black"
android:textSize="22dp" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="90dp"
android:background="@color/white"
android:orientation="horizontal">

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginTop="5dp"
android:text="Buy crop"
android:textSize="16dp"/>

</LinearLayout>

</LinearLayout>

</androidx.cardview.widget.CardView>

You might also like