Adapter

interface Adapter<T : Any>

Functions

Link copied to clipboard
open fun annotationLevel(element: T, buildings: Set<Building>): Level?

Provide the level on the map for the given element

Link copied to clipboard
abstract fun annotationLocation(element: T): GeographicCoordinate

Provide the location on the map for the given element

Link copied to clipboard
abstract fun bindView(coordinateAnnotationViewHolder: CoordinateAnnotationViewHolder, element: T)

Bind data for the given element to the view holder

Link copied to clipboard
abstract fun createView(parent: ViewGroup, viewType: Int): CoordinateAnnotationViewHolder

Create the view holder for the given view type

Link copied to clipboard
open fun elementStableId(element: T): Any?

Stable identifier for the element, or null if it has none. When provided, replace rebinds an existing view in place for a refreshed same-id element instead of unmount/remount — preserving selection and skipping bindView when the content is unchanged.

Link copied to clipboard
open fun elementViewType(element: T): Int

Override this method if you wish to provide different view types for a given element