[Dialog/Events] Make new event list dialog.

This commit is contained in:
Kacper Ziubryniewicz
2019-11-30 23:33:20 +01:00
parent 47d395de71
commit d1265dc1f2
14 changed files with 534 additions and 291 deletions

View File

@ -1,99 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
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:id="@+id/detailsLayout"
<layout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/lessonChangeContainer"
layout="@layout/row_lesson_change_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:visibility="gone"
tools:visibility="visible" />
<include
android:id="@+id/teacherAbsenceContainer"
layout="@layout/row_teacher_absence_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:visibility="gone"
tools:visibility="visible" />
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:id="@+id/eventListLessonDetails"
android:id="@+id/detailsLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/eventListLessonDate"
<include
android:id="@+id/lessonChangeContainer"
layout="@layout/row_lesson_change_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="21 października 2018, 9:05" />
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:visibility="gone"
tools:visibility="visible" />
<include
android:id="@+id/teacherAbsenceContainer"
layout="@layout/row_teacher_absence_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:visibility="gone"
tools:visibility="visible" />
<LinearLayout
android:id="@+id/eventListLessonDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:orientation="vertical">
<TextView
android:id="@+id/eventListLessonDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="21 października 2018, 9:05" />
<TextView
android:id="@+id/eventListLessonChange"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="italic"
tools:text="Lekcja odwołana" />
<TextView
android:id="@+id/eventListTeacher"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="italic"
tools:text="Jan Kowalski -> John Doe" />
<TextView
android:id="@+id/eventListClassroom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="italic"
tools:text="029 informatyczna -> 016 językowa" />
</LinearLayout>
<TextView
android:id="@+id/eventListLessonChange"
android:layout_width="match_parent"
android:id="@+id/textNoEvents"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="32dp"
android:text="@string/dialog_event_list_no_data"
android:textStyle="italic"
tools:text="Lekcja odwołana" />
android:visibility="gone" />
<TextView
android:id="@+id/eventListTeacher"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/eventListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="italic"
tools:text="Jan Kowalski -> John Doe" />
<TextView
android:id="@+id/eventListClassroom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="italic"
tools:text="029 informatyczna -> 016 językowa" />
android:layout_marginTop="8dp"
android:clipToPadding="false"
android:paddingLeft="24dp"
android:paddingTop="8dp"
android:paddingRight="24dp"
android:paddingBottom="8dp"
tools:listitem="@layout/row_dialog_event_list_item" />
</LinearLayout>
<TextView
android:id="@+id/textNoEvents"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="32dp"
android:text="@string/dialog_event_list_no_data"
android:textStyle="italic"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/eventListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:clipToPadding="false"
android:paddingLeft="24dp"
android:paddingTop="8dp"
android:paddingRight="24dp"
android:paddingBottom="8dp"
tools:listitem="@layout/row_dialog_event_list_item" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
</layout>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:agendaCalendar="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:agendaCalendar="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -33,8 +32,5 @@
agendaCalendar:layout_constraintTop_toTopOf="parent"
agendaCalendar:layout_constraintVertical_bias="1.0" >
</com.github.tibolte.agendacalendarview.AgendaCalendarView>
</LinearLayout>
</layout>
</layout>

View File

@ -1,166 +1,165 @@
<?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
<layout>
<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:layout_margin="5dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/eventListItemRoot"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_rounded_8dp_outline"
android:padding="8dp">
android:layout_margin="5dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="wrap_content"
android:id="@+id/eventListItemRoot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:background="@drawable/bg_rounded_8dp_outline"
android:padding="8dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.mikepenz.iconics.view.IconicsTextView
android:id="@+id/eventListItemClock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="{cmd-clock}"
tools:text=" "
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName" />
<TextView
android:id="@+id/eventListItemStartTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
app:layout_constraintStart_toEndOf="@+id/eventListItemClock"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName"
tools:text="startTime" />
<TextView
android:id="@+id/eventListItemAddedDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView9"
tools:text="TextView" />
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_added_time"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/eventListItemClock" />
<TextView
android:id="@+id/eventListItemTeamName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="TextView" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/eventListItemTeacherName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintEnd_toStartOf="@+id/eventListItemEdit"
app:layout_constraintStart_toEndOf="@+id/eventListItemHomework"
app:layout_constraintTop_toTopOf="parent"
tools:text="TextView\nTextView" />
<com.mikepenz.iconics.view.IconicsImageView
android:id="@+id/eventListItemEdit"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="?android:attr/selectableItemBackground"
android:visibility="visible"
app:iiv_color="?android:textColorSecondary"
app:iiv_icon="cmd-pencil"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@android:drawable/ic_partial_secure" />
<TextView
android:id="@+id/eventListItemType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeacherName"
tools:text="zadanie domowe" />
<TextView
android:id="@+id/eventListItemTopic"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textAppearance="@style/NavView.TextView.Medium"
android:textIsSelectable="true"
android:autoLink="all"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/eventListItemType"
tools:text="TextView" />
<com.mikepenz.iconics.view.IconicsTextView
android:id="@+id/eventListItemClock"
android:layout_width="wrap_content"
android:id="@+id/eventListItemSharedBy"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="{cmd-clock}"
tools:text=" "
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName" />
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:ellipsize="end"
android:maxLines="1"
tools:text="{cmd-share-variant} przez Jan Kowalski"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic" />
<TextView
android:id="@+id/eventListItemStartTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
app:layout_constraintStart_toEndOf="@+id/eventListItemClock"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName"
tools:text="startTime" />
<TextView
android:id="@+id/eventListItemAddedDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView9"
tools:text="TextView" />
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/event_added_time"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/eventListItemClock" />
<TextView
android:id="@+id/eventListItemTeamName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="TextView" />
<com.mikepenz.iconics.view.IconicsImageView
android:id="@+id/eventListItemHomework"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:visibility="gone"
app:iiv_color="?android:textColorSecondary"
app:iiv_icon="cmd-home"
app:layout_constraintBottom_toBottomOf="@+id/eventListItemTeacherName"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toTopOf="@+id/eventListItemTeacherName"
tools:src="@android:drawable/star_big_on" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/eventListItemTeacherName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/NavView.TextView.Helper"
app:layout_constraintEnd_toStartOf="@+id/eventListItemEdit"
app:layout_constraintStart_toEndOf="@+id/eventListItemHomework"
app:layout_constraintTop_toTopOf="parent"
tools:text="TextView\nTextView" />
<com.mikepenz.iconics.view.IconicsImageView
android:id="@+id/eventListItemEdit"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="?android:attr/selectableItemBackground"
android:visibility="visible"
app:iiv_color="?android:textColorSecondary"
app:iiv_icon="cmd-pencil"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@android:drawable/ic_partial_secure" />
<TextView
android:id="@+id/eventListItemType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeacherName"
tools:text="zadanie domowe" />
<TextView
android:id="@+id/eventListItemTopic"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textAppearance="@style/NavView.TextView.Medium"
android:textIsSelectable="true"
android:autoLink="all"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/eventListItemType"
tools:text="TextView" />
<com.mikepenz.iconics.view.IconicsTextView
android:id="@+id/eventListItemSharedBy"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:ellipsize="end"
android:maxLines="1"
tools:text="{cmd-share-variant} przez Jan Kowalski"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic" />
<com.mikepenz.iconics.view.IconicsImageView
android:id="@+id/eventListItemHomework"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:visibility="gone"
app:iiv_color="?android:textColorSecondary"
app:iiv_icon="cmd-home"
app:layout_constraintBottom_toBottomOf="@+id/eventListItemTeacherName"
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
app:layout_constraintTop_toTopOf="@+id/eventListItemTeacherName"
tools:src="@android:drawable/star_big_on" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</layout>

View File

@ -1056,4 +1056,5 @@
<string name="home_timetable_lesson_not_started">Za chwilę: %s</string>
<string name="home_timetable_lessons_remaining">Pozostało lekcji: %d - do %s</string>
<string name="grade_subject_format">z %s</string>
<string name="concat_2_strings" translatable="false">%s%s</string>
</resources>