<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:orientation="vertical">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/homeworksItemCard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        app:cardElevation="4dp"
        app:cardCornerRadius="5dp"
        android:background="?selectableItemBackground"
        android:paddingLeft="10dp"
        android:paddingTop="5dp"
        android:paddingRight="10dp"
        android:paddingBottom="3dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:padding="8dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/homeworksItemHomeworkDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="16dp"
                    android:textAppearance="@style/TextAppearance.AppCompat.Small"
                    android:textSize="16sp"
                    tools:text="homeworkDate"
                    android:layout_marginEnd="16dp" />

                <com.mikepenz.iconics.view.IconicsTextView
                    android:id="@+id/homeworksItemSharedBy"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:layout_marginEnd="8dp"
                    android:ellipsize="end"
                    android:gravity="end"
                    android:maxLines="1"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@+id/constraintLayout"
                    app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic"
                    tools:text="{cmd-share-variant} przez" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/homeworksItemTopic"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:paddingBottom="4dp"
                    android:textSize="18sp"
                    android:textIsSelectable="true"
                    android:autoLink="all"
                    tools:text="topic???" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/homeworksItemEdit"
                    style="@style/Widget.MaterialComponents.Button.OutlinedButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="0"
                    android:minHeight="0dp"
                    android:text="@string/homework_edit"
                    android:visibility="visible" /><!--android:minWidth="0dp"
                    android:minHeight="0dp"-->
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/homeworksItemSubjectTeacher"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="8dp"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:singleLine="true"
                    android:textAppearance="@style/TextAppearance.AppCompat.Small"
                    tools:text="subjectName, teacherName" />

                <TextView
                    android:id="@+id/homeworksItemTeamDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/TextAppearance.AppCompat.Small"
                    tools:text="teamName addedDate" />
            </LinearLayout>
        </LinearLayout>

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

</LinearLayout>