Browse Source

added help massage when selecting stops from map

develop
Robin Thoni 8 years ago
parent
commit
5713b6e10e

+ 7
- 0
app/src/main/java/com/rthoni/stssaguenay/ui/fragments/StopMapPickerFragment.java View File

@@ -176,6 +176,13 @@ public class StopMapPickerFragment extends Fragment {
176 176
         _map.getUiSettings().setMyLocationButtonEnabled(true);
177 177
         _map.getUiSettings().setCompassEnabled(true);
178 178
         _map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(48.3786565, -71.3354953), 9));
179
+        _map.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
180
+            @Override
181
+            public boolean onMarkerClick(Marker marker) {
182
+                Toast.makeText(getContext(), R.string.stop_add_map_help, Toast.LENGTH_LONG).show();
183
+                return false;
184
+            }
185
+        });
179 186
         _map.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
180 187
             @Override
181 188
             public void onInfoWindowClick(Marker marker) {

+ 1
- 0
app/src/main/res/values/strings.xml View File

@@ -15,6 +15,7 @@
15 15
     <string name="stop_add">Add a favourite stop</string>
16 16
     <string name="stop_add_map">Select from map</string>
17 17
     <string name="stop_add_list">Select from list</string>
18
+    <string name="stop_add_map_help">Click on the stop name to select it</string>
18 19
 
19 20
     <string name="loading">Loading&#8230;</string>
20 21
     <string name="loading_schedules">Loading schedules&#8230;</string>

Loading…
Cancel
Save