WIP: [routing] User routes feature #8260

Draft
fgbg03 wants to merge 8 commits from fgbg03/user_routes_feature into master

8 commits

Author SHA1 Message Date
Fábio Gomes
3d059f6224 [strings] Move hardcoded strings to string resource file
The hardcoded strings from the user routes feature were moved
into the default strings resource file.
Translations to these strings were added for portuguese.

Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-06-25 11:01:52 +01:00
Fábio Gomes
a241a68189 [android] Fix missing newlines from previous commit
Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-06-21 10:44:45 +01:00
Fábio Gomes
a1cb87bca6 [android] Add UI elements for user route management
For users to interact with this feature the following was added:

- Button in the map screen to enter a bottom sheet menu

- Fragment for the bottom sheet menu.
  Contains a button to save the selected route, the button is
  disabled if there are not enough route points;
  a recycle view with an item for each user route.

- A route item contains a button with the name of the route,
  used to load the route points; a button to rename the route;
  and a button to delete the route. Checks are in place to
  confirm before deleting a route or overwriting an existing one.

Notes:

- The map screen button has a placeholder icon and a
  placeholder location when not in navigation mode.

- All the text is still hard coded in English and
  is to be implemented correctly shortly.

- It might make sense to move this from a bottom sheet next to
  the bookmarks, as to keep every user saved element together.

Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-06-21 10:12:34 +01:00
Fábio Gomes
7ab0c25a13 [android] Add native function for user routes feature
Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-06-21 09:57:21 +01:00
Fábio Gomes
ea4da2a82a [routing] Make GetUserRouteNames return an ordered vector
Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-06-21 09:54:23 +01:00
Fábio Gomes
3f4b28704c [map] Add tests for user routes
Add more complete tests for user routes
Fix some issues found through the tests

Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-05-26 15:02:42 +01:00
Fábio Gomes
74fac52d5e Fix missing newline at the end of test file
Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-05-23 13:10:16 +01:00
Fábio Gomes
150eaa1c6b [WIP] Add User Route saving functionality
Enables the creation of user routes to be loaded at any time.
Overloads previous methods that handled the saved route points and
creates a generalised verion capable of using any file path.
New function use these generalised methods to handle user routes.
Adds a test to the map_tests folder (in progress)

Signed-off-by: Fábio Gomes <gabriel.gomes@tecnico.ulisboa.pt>
2024-05-23 12:34:36 +01:00