sdk-traffic / com.tomtom.online.sdk.traffic.api.incident.icons / TrafficIncidentIconProvider / getIcon

getIcon

@Nullable open fun getIcon(context: Context!, size: TrafficIncidentIconProvider.IconSize!): Drawable?

Obtains the drawable based on magnitude and category of the traffic incident. It also provides the chosen size of drawable: small, medium or large.

Parameters

context - Context!: - the Android's context

size - TrafficIncidentIconProvider.IconSize!: - the size of the returned drawable

Return
Drawable?: drawable for traffic incident which is chosen based on magnitude, category and the chosen size.