use of com.mapbox.mapboxsdk.annotations.IconFactory in project mapbox-navigation-android by mapbox.
the class ThemeSwitcher method retrieveMapMarker.
/**
* Returns a map marker {@link Icon} based on the current theme setting.
*
* @param context to retrieve {@link SharedPreferences} and an instance of {@link IconFactory}
* @return {@link Icon} map marker dark or light
*/
static Icon retrieveMapMarker(Context context) {
TypedValue destinationMarkerResId = obtainTypedValue(context, R.attr.navigationViewDestinationMarker);
int markerResId = destinationMarkerResId.resourceId;
IconFactory iconFactory = IconFactory.getInstance(context);
return iconFactory.fromResource(markerResId);
}
Aggregations