/** * Returns the currently focused stop, or null if no stop is in focus * * @return the currently focused stop, or null if no stop is in focus */ public ObaStop getFocus() { if (mMarkerData != null) { return mMarkerData.getFocus(); } return null; }
/** * Removes the stop focus and notify listener * * @param latLng the location on the map where the user tapped if the focus change was triggered * by the user tapping on the map, or null if the focus change was otherwise triggered * programmatically. */ private void removeFocus(LatLng latLng) { if (mMarkerData.getFocus() != null) { mMarkerData.removeFocus(); } // Set map clicked location, if it exists Location location = null; if (latLng != null) { location = MapHelpV2.makeLocation(latLng); } // Notify focus changed every time the map is clicked away from a stop marker mOnFocusChangedListener.onFocusChanged(null, null, location); }