Archived
Fixed colours for icons to tell the user that canteen offers are hidden or that they have no events; added tooltips to buttons in canteen fragment; edited README.md to use new iamge paths
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
## WeserPlaner – University of Bremen Companion App
|
## WeserPlaner – University of Bremen Companion App
|
||||||
WeserPlaner is a work-in-progress Android app for students at the University of Bremen that allows the user to download their schedule from their Stud.IP account, as well as viewing the offers available in all of the canteens operated by the Studierendenwerk Bremen. Handy features are available, such as adding new events and editing existing events, filtering canteen offers only for such that conform to the user's dietary and ethical preferences (e.g. only displaying vegetarian foods), and filtering out any offers including substances the user is allergic against.
|
WeserPlaner is a work-in-progress Android app for students at the University of Bremen that allows the user to download their schedule from their Stud.IP account, as well as viewing the offers available in all of the canteens operated by the Studierendenwerk Bremen. Handy features are available, such as adding new events and editing existing events, filtering canteen offers only for such that conform to the user's dietary and ethical preferences (e.g. only displaying vegetarian foods), and filtering out any offers including substances the user is allergic against.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Progress
|
## Progress
|
||||||
- Downloading and creating events, as well as displaying them.
|
- Downloading and creating events, as well as displaying them.
|
||||||
@@ -29,4 +29,4 @@ The colour scheme is inspired by the University of Bremen's colour scheme, as we
|
|||||||
|
|
||||||
I admit the Weserstadion idea only came to me after I had created the logo.
|
I admit the Weserstadion idea only came to me after I had created the logo.
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class CanteenOfferItemAdapter(
|
|||||||
val img = ItemIconBinding.inflate(LayoutInflater.from(context))
|
val img = ItemIconBinding.inflate(LayoutInflater.from(context))
|
||||||
|
|
||||||
// Retrieve data for the dietary preference
|
// Retrieve data for the dietary preference
|
||||||
val (_, drawableId, colourId) = DietaryPreferences.getData(
|
val (drawableTextDesc, drawableId, colourId) = DietaryPreferences.getData(
|
||||||
DietaryPreferences.ERROR.ordinal,
|
DietaryPreferences.ERROR.ordinal,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -128,6 +128,9 @@ class CanteenOfferItemAdapter(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Set content description for the icon
|
||||||
|
img.imageView.contentDescription = context.getString(drawableTextDesc)
|
||||||
|
|
||||||
// Set tint of the icon; themed to the preference, if the user has the option enabled
|
// Set tint of the icon; themed to the preference, if the user has the option enabled
|
||||||
img.imageView.imageTintList = ColorStateList.valueOf(
|
img.imageView.imageTintList = ColorStateList.valueOf(
|
||||||
context.theme.getThemedColor(
|
context.theme.getThemedColor(
|
||||||
@@ -181,7 +184,7 @@ class CanteenOfferItemAdapter(
|
|||||||
val img = ItemIconBinding.inflate(LayoutInflater.from(context))
|
val img = ItemIconBinding.inflate(LayoutInflater.from(context))
|
||||||
|
|
||||||
// Retrieve data for the dietary preference
|
// Retrieve data for the dietary preference
|
||||||
val (_, drawableId, colourId) = DietaryPreferences.getData(index)
|
val (drawableTextDesc, drawableId, colourId) = DietaryPreferences.getData(index)
|
||||||
|
|
||||||
// Set the appropriate icon
|
// Set the appropriate icon
|
||||||
img.imageView.setImageDrawable(
|
img.imageView.setImageDrawable(
|
||||||
@@ -191,6 +194,9 @@ class CanteenOfferItemAdapter(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Set content description for the icon
|
||||||
|
img.imageView.contentDescription = context.getString(drawableTextDesc)
|
||||||
|
|
||||||
// Set tint of the icon
|
// Set tint of the icon
|
||||||
img.imageView.imageTintList = ColorStateList.valueOf(
|
img.imageView.imageTintList = ColorStateList.valueOf(
|
||||||
context.theme.getThemedColor(
|
context.theme.getThemedColor(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/snackbar_container"
|
android:id="@+id/snackbar_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@@ -56,7 +57,9 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/app_title_bar"
|
app:layout_constraintTop_toTopOf="@id/app_title_bar"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/app_title_bar"
|
app:layout_constraintBottom_toBottomOf="@id/app_title_bar"
|
||||||
app:layout_constraintEnd_toStartOf="@id/button_notifications"
|
app:layout_constraintEnd_toStartOf="@id/button_notifications"
|
||||||
app:iconTint="?attr/colorOnSurfaceVariant"/>
|
app:iconTint="?attr/colorOnSurfaceVariant"
|
||||||
|
tools:ignore="UnusedAttribute"
|
||||||
|
android:tooltipText="@string/canteen_button_opening_hours_hint"/>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
style="@style/Widget.Material3.Button.IconButton.Outlined"
|
style="@style/Widget.Material3.Button.IconButton.Outlined"
|
||||||
@@ -70,7 +73,9 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/app_title_bar"
|
app:layout_constraintTop_toTopOf="@id/app_title_bar"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/app_title_bar"
|
app:layout_constraintBottom_toBottomOf="@id/app_title_bar"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:iconTint="?attr/colorOnSurfaceVariant"/>
|
app:iconTint="?attr/colorOnSurfaceVariant"
|
||||||
|
tools:ignore="UnusedAttribute"
|
||||||
|
android:tooltipText="@string/canteen_button_notifications_hint"/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@@ -245,11 +250,6 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="TEST TEST TEST TEST ABC 123 !!!"/>-->
|
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -54,13 +54,14 @@
|
|||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="4dp">
|
android:layout_marginTop="4dp">
|
||||||
|
|
||||||
<ImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_marginHorizontal="4dp"
|
android:layout_marginHorizontal="4dp"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:tint="?attr/colorText"
|
android:tint="?attr/colorText"
|
||||||
android:src="@drawable/visibility_off"/>
|
android:src="@drawable/visibility_off"
|
||||||
|
android:importantForAccessibility="no"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_difference"
|
android:id="@+id/text_difference"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:paddingVertical="4dp"
|
android:paddingVertical="4dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -62,13 +61,14 @@
|
|||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="4dp">
|
android:layout_marginTop="4dp">
|
||||||
|
|
||||||
<ImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_marginHorizontal="4dp"
|
android:layout_marginHorizontal="4dp"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:tint="?attr/colorText"
|
android:tint="?attr/colorText"
|
||||||
android:src="@drawable/edit_off"/>
|
android:src="@drawable/edit_off"
|
||||||
|
android:importantForAccessibility="no"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_no_events"
|
android:id="@+id/text_no_events"
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp">
|
android:layout_height="20dp">
|
||||||
|
|
||||||
<ImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/image_view"
|
android:id="@+id/image_view"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:tint="?attr/colorOnSurfaceVariant" />
|
android:tint="?attr/colorOnSurfaceVariant"/>
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@@ -2,16 +2,16 @@
|
|||||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/preference_image"
|
android:id="@+id/preference_image"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:tint="?attr/colorOnSurfaceVariant"
|
android:tint="?attr/colorOnSurfaceVariant"
|
||||||
android:layout_marginEnd="8dp"/>
|
android:layout_marginEnd="8dp"
|
||||||
|
android:importantForAccessibility="no"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/preference_text"
|
android:id="@+id/preference_text"
|
||||||
|
|||||||
@@ -73,6 +73,9 @@
|
|||||||
<string name="sheet_schedule_update_time_dialog_start_hint">Startzeit der Veranstaltung</string>
|
<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="sheet_schedule_update_time_dialog_end_hint">Schlusszeit der Veranstaltung</string>
|
||||||
|
|
||||||
|
<string name="canteen_button_opening_hours_hint">Siehe Öffnungszeiten der Mensa</string>
|
||||||
|
<string name="canteen_button_notifications_hint">Siehe Neuigkeiten der Mensa</string>
|
||||||
|
|
||||||
<string name="canteen_no_offer_header">Kein Angebot</string>
|
<string name="canteen_no_offer_header">Kein Angebot</string>
|
||||||
<string name="canteen_no_offer_desc">Für diesen Tag sind keine Angebote vorhanden</string>
|
<string name="canteen_no_offer_desc">Für diesen Tag sind keine Angebote vorhanden</string>
|
||||||
<string name="canteen_news_sheet_title">Neuigkeiten für diese Mensa</string>
|
<string name="canteen_news_sheet_title">Neuigkeiten für diese Mensa</string>
|
||||||
|
|||||||
@@ -75,6 +75,9 @@
|
|||||||
<string name="sheet_schedule_update_time_dialog_start_hint">Event start time</string>
|
<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="sheet_schedule_update_time_dialog_end_hint">Event end time</string>
|
||||||
|
|
||||||
|
<string name="canteen_button_opening_hours_hint">View canteen opening hours</string>
|
||||||
|
<string name="canteen_button_notifications_hint">View canteen notifications</string>
|
||||||
|
|
||||||
<string name="canteen_no_offer_header">No offers</string>
|
<string name="canteen_no_offer_header">No offers</string>
|
||||||
<string name="canteen_no_offer_desc">There are no offers available for this day</string>
|
<string name="canteen_no_offer_desc">There are no offers available for this day</string>
|
||||||
<string name="canteen_news_sheet_title">News for this canteen</string>
|
<string name="canteen_news_sheet_title">News for this canteen</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user