szkolnyplus/app/src/main/res/layout/attendance_item_attendance.xml
2021-10-17 21:02:35 +02:00

96 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) Kuba Szczodrzyński 2020-4-29.
-->
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View"/>
<variable
name="simpleMode"
type="Boolean" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingVertical="8dp">
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
android:id="@+id/attendanceView"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginHorizontal="8dp"
android:layout_marginTop="4dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:background="@drawable/bg_rounded_8dp"
tools:backgroundTint="#f44336"
tools:gravity="center"
tools:text="nb"
tools:textSize="22sp" />
<TextView
android:id="@+id/type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:ellipsize="middle"
android:maxLines="2"
android:singleLine="true"
android:textAppearance="@style/NavView.TextView.Helper"
android:textSize="16sp"
app:layout_constraintEnd_toStartOf="@+id/unread"
app:layout_constraintStart_toEndOf="@+id/attendanceView"
app:layout_constraintTop_toTopOf="parent"
tools:text="Nieobecność nieusprawiedliwiona" />
<TextView
android:id="@+id/subjectName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:ellipsize="middle"
android:maxLines="2"
android:singleLine="true"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/attendanceView"
app:layout_constraintTop_toBottomOf="@+id/type"
tools:text="Język angielski" />
<TextView
android:id="@+id/dateTime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:ellipsize="middle"
android:maxLines="2"
android:singleLine="true"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/attendanceView"
app:layout_constraintTop_toBottomOf="@+id/subjectName"
tools:text="2 marca 2019 • 10:45 • lekcja 4" />
<View
android:id="@+id/unread"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginHorizontal="8dp"
android:background="@drawable/unread_red_circle"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/type"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>