Package com.tomtom.tools.android.api.resourceresolution.string

Types

Link copied to clipboard
data class AmPmIndicatorStringResolver(instantMilliseconds: Long) : StringResolver

A StringResolver that takes a date time value in milliseconds and resolves that to the String representation of an AM or PM indicator.

Link copied to clipboard
data class AttrStringResolver(@AttrRes attrId: Int) : StringResolver

A StringResolver that resolves a String from a theme based on attrId.

Link copied to clipboard
data class CompositeStringResolver(resolvers: List<StringResolver>, separator: StringResolver) : StringResolver

A StringResolver that creates a string from the given resolvers, separated using separator.

Link copied to clipboard
data class DurationStringResolver(duration: Duration) : StringResolver

A StringResolver that takes a duration and resolves that to a String representation of the duration (e.g. h:mm:ss for English) in which the hour component is only added when it is non-zero.

Link copied to clipboard
interface FlowStringResolver : StringResolver

A StringResolver which provides a Flow. This Flow will emit updates to the string using the context.

Link copied to clipboard
data class HourMinuteStringResolver(instant: Instant) : StringResolver

A StringResolver that takes a date time value in milliseconds and resolves that to the String representation using the specified format HH:mm or h:m in the default time zone for the given Context.

Link copied to clipboard
data class InstantStringResolver(instant: Instant, formatStyle: FormatStyle) : StringResolver

A StringResolver that takes an Instant date time value and resolves that to the String representation using the specified FormatStyle in the default time zone for the given Context.

Link copied to clipboard
data class LabeledDurationStringResolver(duration: Duration) : StringResolver

A StringResolver that takes a duration and resolves it to a String which is the concatenation of the number of minutes with the minute indicator.

Link copied to clipboard
data class LocalTimeStringResolver(time: LocalTime) : StringResolver

A StringResolver that takes a LocalTime value and resolves it to a String representation using a 12 or 24 hour format pattern and, for 12 hour format, a meridiem (am/pm) string. The selection of time format and meridiem string resources is determined by the Context's 24 hour format preference.

Link copied to clipboard
data class PhoneNumberStringResolver(number: String) : StringResolver

A StringResolver that takes a phone number and resolves it into a formatted phone number.

Link copied to clipboard
class PluralResourceStringResolver : StringResolver

A StringResolver that retrieves pluralised strings from the given Context. For more information on the returned values see Resources.getQuantityString.

Link copied to clipboard
data class RelativeTimeSpanStringResolver(time: Instant, updateDurationMs: Long) : FlowStringResolver

A StringResolver that takes a time and resolves it to a String representation that shows the relative time.

Link copied to clipboard
class ResourceStringResolver : StringResolver

A StringResolver that resolves a String from resources. formatArguments that are StringResolvers will be automatically resolved as well.

Link copied to clipboard
data class StaticStringResolver(value: Any) : StringResolver

A StringResolver that can represent any object based on its toString implementation.

Link copied to clipboard
interface StringResolver : Parcelable

An interface for classes that resolve a String based on a Context. This is useful to separate business logic from presentation, where a service or ViewModel can refer to a resource or other types of data that depend on the Locale or display without needing a Context to resolve its value.

Link copied to clipboard
class TemperatureStringResolver(temperatureCelsius: Number) : StringResolver