[Agenda] Add teachers absence dialog

This commit is contained in:
Kacper Ziubryniewicz
2019-09-29 01:17:08 +02:00
parent 0b0cd4c76e
commit c8f24611ba
13 changed files with 180 additions and 36 deletions

View File

@ -9,8 +9,8 @@
<include
layout="@layout/row_dialog_lesson_change_item"
layout="@layout/row_lesson_change_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
</com.github.tibolte.agendacalendarview.agenda.AgendaEventView>
</com.github.tibolte.agendacalendarview.agenda.AgendaEventView>

View File

@ -7,7 +7,7 @@
<include
layout="@layout/row_dialog_teacher_absence_item"
layout="@layout/row_teacher_absence_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />

View File

@ -16,7 +16,7 @@
<include
android:id="@+id/lesson_change_container"
layout="@layout/row_dialog_lesson_change_item"
layout="@layout/row_lesson_change_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
@ -87,4 +87,4 @@
</androidx.recyclerview.widget.RecyclerView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/teacherAbsenceView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/row_dialog_teacher_absence_item" />
</LinearLayout>
</layout>

View File

@ -1,35 +1,34 @@
<androidx.cardview.widget.CardView android:id="@+id/teacher_absence_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:cardBackgroundColor="@color/blue_selected"
app:cardCornerRadius="5dp"
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:background="?selectableItemBackground"
app:cardCornerRadius="5dp"
app:cardElevation="4dp">
<TextView
android:id="@+id/teacher_absence_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:textAppearance="@style/NavView.TextView.Medium"
android:text="@string/agenda_teacher_absence" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_rounded_8dp_outline"
android:padding="8dp">
<TextView
android:id="@+id/teacher_absence_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
tools:text="3" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/teacherAbsenceTeacher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Jan Kowalski"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>

View File

@ -0,0 +1,35 @@
<androidx.cardview.widget.CardView android:id="@+id/teacherAbsenceCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:cardBackgroundColor="@color/blue_selected"
app:cardCornerRadius="5dp"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:id="@+id/teacherAbsenceText"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:textAppearance="@style/NavView.TextView.Medium"
android:text="@string/agenda_teacher_absence" />
<TextView
android:id="@+id/teacherAbsenceCount"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
tools:text="3" />
</LinearLayout>
</androidx.cardview.widget.CardView>