This PR mainly consists in adapting all the activities to enable make sure they react correctly to a switch to dark mode in the android system settings. A few things to note:
Some activities were found to be using a custom TopAppBar "homemade". Those were all converted to using Jetpack Compose' built-in TopAppBar for consistency. This also allows the bar to support dark mode natively. Those activities usually had unexpected behavior when clicking on the back button of the bar (launching an intent to a specific activity instead of just closing the current activity). Those behaviors have been fixed for consistency. Now, clicking on a back button throughout the app always means the same thing: closing the current activity and going back to the previous one.
The schedule activity now uses the dashboard as a TopAppBar with a custom title, making it more consistent with other main activities of the app. After some testing, I found that keeping the color of the text black for schedule events made the text the most visible. I tried dynamically choosing the color of the text based on the color of the event in the schedule, but having some events with white text and some with black text didn't seem nice to me. The code is still here, commented out if we decide to use it.
The TopAppBar is now black in dark mode, as opposed to purple, as it is preferred to avoid having large surfaces filled with bright colors in dark mode. This is also the default behavior of the built-in jetpack Compose' TopAppBar.
The chat activity colors had to be adapted for dark mode. Don't hesitate to give feedback if you don't like them.
The map colors were also updated to a night theme when in dark mode.
For the CreateEventActivity, the only issue was about the Dialogs using the maxkeppeler library. Those are using Material 3, which uses a different theme system. I tried enabling material 3 in our app and providing a theme to those components, and everything runs well locally, but some dependency of material 3 seems to need JDK version 9 or above to be compiled, and the CI currently runs JDK 8. A question was posted on Discord for a solution, but for now, the changes regarding material 3 theming were reverted, so that all changes can be merged to main quickly. If necessary, a second PR will be done to fix this, but for now, the maxkeppeler dialogs are displayed in white no matter the theme :(
The Google Places Autocomplete activity also only partially supports dark mode, and there is nothing that can be done about it.
Other minor changes:
A good amount of new sports were added to the Sports enum. The SelectSportsList activity was also adapted to better handle a big list of sports. Test also had to be adapted to support scrolling through the sports list that might not always be displayed entirely. A few issues had to be addressed, mainly the fact that the use of LazyColumn in the SelectSportsList activity didn't allow tests to detect compose elements not currently displayed by the list, so it was swapped with a regular Column.
A loading animation was added to the login activity to make sure the user knows the map activity is being launched.
Some composables were modularized to used the same design (list item components) in ListItem.kt. This was part of my last PR, but could not be finished properly.
As per comments in the last PR, documentation was added to those composables and activities related to group events.
Note that the CreateEventActivity looks a bit off compared to the design of the rest of the app. It might need some rework, which was not done here.
This PR mainly consists in adapting all the activities to enable make sure they react correctly to a switch to dark mode in the android system settings. A few things to note:
Other minor changes:
Note that the CreateEventActivity looks a bit off compared to the design of the rest of the app. It might need some rework, which was not done here.