rv_item_device.xml 2.88 KB
<?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_marginBottom="10dp"
    app:cardCornerRadius="1dp">

    <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/tv_device_number"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginBottom="5dp"
            android:fontFamily="@font/g_market_sans_ttf_medium"
            android:text="@string/sample_device_number"
            android:textColor="#212121"
            android:textSize="14sp"
            app:layout_constraintBottom_toTopOf="@+id/img_icon_calender"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_chainStyle="packed" />

        <ImageView
            android:id="@+id/img_icon_calender"
            android:layout_width="15dp"
            android:layout_height="15dp"
            android:src="@drawable/round_today_24"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="@+id/tv_device_number"
            app:layout_constraintTop_toBottomOf="@id/tv_device_number"
            app:layout_constraintVertical_chainStyle="packed" />

        <TextView
            android:id="@+id/tv_device_register_date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:layout_marginBottom="1dp"
            android:fontFamily="@font/g_market_sans_ttf_medium"
            android:text="@string/sample_date"
            android:textColor="#90a4ae"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="@id/img_icon_calender"
            app:layout_constraintStart_toEndOf="@id/img_icon_calender"
            app:layout_constraintTop_toTopOf="@id/img_icon_calender" />

        <ImageView
            android:id="@+id/img_trashcan"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginVertical="20dp"
            android:layout_marginEnd="15dp"
            android:src="@drawable/round_delete_24"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>