<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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">

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="12dp"
        android:layout_marginVertical="6dp"
        app:cardCornerRadius="6dp">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="10dp">

            <TextView
                android:id="@+id/name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textStyle="bold"
                android:textSize="16sp"
                android:singleLine="true"
                android:ellipsize="marquee"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@+id/profile_menu"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toTopOf="@+id/state"
                app:layout_constraintHorizontal_bias="0"
                app:layout_constrainedWidth="true" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/profile_menu"
                android:layout_width="32dp"
                android:layout_height="25dp"
                android:background="?selectableItemBackground"
                android:src="@drawable/ic_menu_black"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintRight_toRightOf="parent"/>

            <TextView
                android:id="@+id/state"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:textSize="14sp"
                android:textStyle="italic"
                android:singleLine="true"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/name"
                app:layout_constraintBottom_toTopOf="@+id/provider_label"/>

            <TextView
                android:id="@+id/provider_label"
                android:text="@string/profile_provider"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:textSize="14sp"
                android:textStyle="bold"
                android:singleLine="true"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/state"
                app:layout_constraintBottom_toTopOf="@+id/profile_class_label"/>

            <TextView
                android:id="@+id/provider"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginStart="7dp"
                android:textSize="14sp"
                android:singleLine="true"
                app:layout_constraintLeft_toRightOf="@id/provider_label"
                app:layout_constraintTop_toBottomOf="@id/state"
                app:layout_constraintBottom_toTopOf="@+id/profile_class"/>

            <TextView
                android:id="@+id/profile_class_label"
                android:text="@string/profile_class"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:textSize="14sp"
                android:textStyle="bold"
                android:singleLine="true"
                android:visibility="gone"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/provider_label"
                app:layout_constraintBottom_toTopOf="@+id/iccid_label"/>

            <TextView
                android:id="@+id/profile_class"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginStart="7dp"
                android:textSize="14sp"
                android:singleLine="true"
                android:visibility="gone"
                app:layout_constraintLeft_toRightOf="@id/profile_class_label"
                app:layout_constraintTop_toBottomOf="@id/provider"
                app:layout_constraintBottom_toTopOf="@+id/iccid"/>

            <TextView
                android:id="@+id/iccid_label"
                android:text="@string/profile_iccid"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:textSize="14sp"
                android:textStyle="bold"
                android:singleLine="true"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/profile_class_label"
                app:layout_constraintBottom_toBottomOf="parent"/>

            <TextView
                android:id="@+id/iccid"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginStart="7dp"
                android:textSize="14sp"
                android:singleLine="true"
                app:layout_constraintLeft_toRightOf="@id/iccid_label"
                app:layout_constraintTop_toBottomOf="@id/profile_class"
                app:layout_constraintBottom_toBottomOf="parent"/>

            <TextView
                android:id="@+id/profile_sequence_number"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="6dp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@id/iccid" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </com.google.android.material.card.MaterialCardView>

</FrameLayout>