Added TimetableOverviewActivity.kt and a means to launch via a button through EventFragment.kt; implementation unfinished

This commit is contained in:
denizk0461
2023-05-25 12:32:10 +02:00
parent e52a055cf1
commit 98a3a13623
22 changed files with 313 additions and 42 deletions
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.alamkanak.weekview.WeekView
android:id="@+id/week_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+44 -10
View File
@@ -13,17 +13,51 @@
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<androidx.appcompat.widget.AppCompatTextView
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:text="@string/title_schedule"
android:textSize="28sp"
app:fontFamily="@font/lato_blackitalic"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:layout_scrollFlags="scroll"/>
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
app:layout_scrollFlags="scroll">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/app_title_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/title_schedule"
android:textSize="28sp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="4dp"
app: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_view_overview"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.IconButton.Outlined"
android:id="@+id/button_view_overview"
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/schedule_button_overview_hint"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/day_tab_layout"
@@ -18,7 +18,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp">
android:layout_marginEnd="8dp"
app:layout_scrollFlags="scroll">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/app_title_bar"
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"/>
+42 -8
View File
@@ -29,11 +29,11 @@
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_title"
android:id="@+id/text_event_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="22sp"
app:fontFamily="@font/lato_bolditalic"
android:textSize="16sp"
app:fontFamily="@font/lato_italic"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/icon_notify_header"
@@ -46,16 +46,22 @@
android:scaleType="centerInside"
android:tint="?attr/colorText"
android:importantForAccessibility="no"
app:layout_constraintTop_toTopOf="@id/text_title"
app:layout_constraintTop_toTopOf="@id/text_event_title"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_due_date"
android:layout_width="wrap_content"
android:id="@+id/text_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"/>
android:textSize="22sp"
app:fontFamily="@font/lato_bolditalic"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_due_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/layout_expanded_container"
@@ -64,7 +70,6 @@
android:orientation="vertical">
<com.google.android.material.divider.MaterialDivider
android:id="@+id/divider"
style="@style/DividerTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -92,6 +97,35 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_lecturer"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_room"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="4dp">
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:layout_marginHorizontal="8dp"
android:background="?attr/colorText"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
+3
View File
@@ -48,6 +48,7 @@
<string name="fetch_bar_help_sheet_content"> • Logge dich mit deinem Stud.IP-Login ein\n • Öffne deinen Stundenplan, falls er sich nicht automatisch öffnet, indem du in der unteren Leiste auf das rechte Logo klickst, das wie ein Stift und ein Lineal aussieht\n • Klicke auf den \'Speichern\'-Knopf, der unten in der rechten Ecke auftaucht\n • Fertig!</string>
<string name="fetch_bar_save_desc">Speichere den Stundenplan in der App ab</string>
<string name="schedule_button_overview_hint">Siehe gesamten Stundenplan</string>
<string name="schedule_fab_add_text">Neue Veranstaltung</string>
<string name="schedule_no_events">%ss hast du keine Veranstaltungen.</string>
@@ -249,6 +250,8 @@
<string name="settings_launch_canteen_title">Wähle, mit welchem Bildschirm die App startet</string>
<string name="settings_date_format_title">Wähle das Format für Datumsangaben</string>
<string name="settings_pref_colour_title">Färbe Diätpreferenzen</string>
<string name="settings_pref_colour_subtitle">Dies färbt die kleinen Symbole ähnlich wie auf der Webseite</string>
+9
View File
@@ -49,6 +49,7 @@
<string name="fetch_bar_help_sheet_content"> • Log in with your Stud.IP login\n • Open your timetable view, in case it doesn\'t open automatically, by clicking the rightmost icon in the bottom bar that looks like a pencil and a ruler\n • Click the \'save\' button that appears in the bottom right corner\n • Done!</string>
<string name="fetch_bar_save_desc">Save the timetable in the app</string>
<string name="schedule_button_overview_hint">View full schedule</string>
<string name="schedule_fab_add_text">New event</string>
<string name="schedule_no_events">You don\'t have any events for %s.</string>
@@ -257,6 +258,14 @@
<string name="settings_launch_canteen_title">Select which screen to start the app with</string>
<string name="settings_date_format_title">Select which format to show dates in</string>
<string-array name="settings_date_format_items" translatable="false">
<item>24.05.2023, 8:45</item>
<item>20230524, 08:45</item>
<item>20230524, 08:45:11.518</item>
<item>05/24/23, 8:45 AM</item>
</string-array>
<!-- unused - use for possible future implementation of Crashlytics -->
<string name="settings_crashlytics_title">Opt-in to sharing crash data</string>
<string name="settings_crashlytics_subtitle">Data will be anonymised</string> <!-- TODO is this true? -->