This video (episode 4 of 7) starts to build the creation flow which allows the user to add a new map to the list. One thing I forgot to mention in the video is that you can easily set the marker to be draggable by doing this:
mMap.addMarker(MarkerOptions().position(latLng).title(title).snippet(description).draggable(true))
When the user taps on the floating action button, we use the Android intent system to navigate to a new activity (screen) where the user can long-press to add places on the map. We also go over how to delete a marker on the map and how to use a SnackBar for user education.
➤ Playlist link for project: • Android Google Maps Tutorial
➤ Codepath guide about using intents to navigate between screens and getting data back between them: https://guides.codepath.com/android/Using-Intents-to-Create-Flows
➤ Codepath guide about displaying a SnackBar: https://guides.codepath.com/android/Displaying-the-Snackbar
➤ Creating an AlertDialog: https://guides.codepath.com/android/using-dialogfragment
Overview:
In these videos, we build an app which displays a map showing markers of important places. You can also create a map which gets saved to a file and can be retrieved when the app is opened. This app helps you keep track of places that matter to you, whether they’re vacation ideas or places you’ve lived.
18 Comments