Added button to change order for tasks (functionality unimplemented); moved options menu for events to long press, single click is now functionless

This commit is contained in:
denizk0461
2023-05-22 14:16:56 +02:00
parent 75724ace18
commit 61155eaec4
11 changed files with 154 additions and 34 deletions
+5
View File
@@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#000000" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
</vector>
@@ -14,17 +14,50 @@
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<TextView
android:id="@+id/app_title_bar"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:fontFamily="@font/lato_blackitalic"
android:text="@string/title_exam_overview"
app:layout_scrollFlags="scroll"
android:textSize="28sp"/>
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp">
<TextView
android:id="@+id/app_title_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/title_exam_overview"
android:textSize="28sp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="4dp"
android:fontFamily="@font/lato_blackitalic"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/button_order"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.IconButton.Outlined"
android:id="@+id/button_order"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
app:icon="@drawable/sort"
app:iconPadding="0dp"
app:strokeColor="?attr/colorOutlineVariant"
app:layout_constraintTop_toTopOf="@id/app_title_bar"
app:layout_constraintBottom_toBottomOf="@id/app_title_bar"
app:layout_constraintEnd_toEndOf="parent"
app:iconTint="?attr/colorOnSurfaceVariant"
tools:ignore="UnusedAttribute"
android:tooltipText="@string/task_overview_button_order_hint"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="8dp"
android:paddingVertical="4dp"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
android:id="@+id/card_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.Material3.CardView.Outlined">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:clickable="true"
android:focusable="true"
android:padding="16dp">
</androidx.appcompat.widget.LinearLayoutCompat>
</com.google.android.material.card.MaterialCardView>
</androidx.appcompat.widget.LinearLayoutCompat>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/title_alphabetically"
android:title="@string/task_order_menu_title_alphabetically"
android:enabled="true"/>
<item
android:id="@+id/date_created"
android:title="@string/task_order_menu_date_created"
android:enabled="true"/>
<item
android:id="@+id/date_due"
android:title="@string/task_order_menu_date_due"
android:enabled="true"/>
</menu>
+6
View File
@@ -84,6 +84,12 @@
<string name="sheet_schedule_update_time_dialog_start_hint">Startzeit der Veranstaltung</string>
<string name="sheet_schedule_update_time_dialog_end_hint">Schlusszeit der Veranstaltung</string>
<string name="task_overview_button_order_hint">Aufgaben sortieren</string>
<!-- these are TODO -->
<string name="task_order_menu_title_alphabetically">Alphabetisch</string>
<string name="task_order_menu_date_created">Erstellungszeit</string>
<string name="task_order_menu_date_due">Abgabezeit</string>
<string name="task_overview_snack_unimplemented">Aufgaben sind noch nicht implementiert!</string>
<string name="task_overview_fab_add_task">Aufgabe hinzufügen</string>
+5
View File
@@ -86,6 +86,11 @@
<string name="sheet_schedule_update_time_dialog_start_hint">Event start time</string>
<string name="sheet_schedule_update_time_dialog_end_hint">Event end time</string>
<string name="task_overview_button_order_hint">Order tasks</string>
<string name="task_order_menu_title_alphabetically">Alphabetically</string>
<string name="task_order_menu_date_created">Date created</string>
<string name="task_order_menu_date_due">Date due</string>
<string name="task_overview_snack_unimplemented">Tasks are not yet implemented!</string>
<string name="task_overview_fab_add_task">Add task</string>