InstructionLoader

open class InstructionLoader

Utility class that can be used to load a given BannerText into the provided TextView.

For each BannerComponents, either the text or given shield URL will be used (the shield URL taking priority).

If a shield URL is found, Picasso is used to load the image. Then, once the image is loaded, a new ImageSpan is created and set to the appropriate position of the Spannable/

Constructors

InstructionLoader
Link copied to clipboard
open fun InstructionLoader(textView: TextView, bannerText: BannerText)
Creates an InstructionLoader which can handle highway shields and also takes into accountabbreviations.
InstructionLoader
Link copied to clipboard
open fun InstructionLoader(textView: TextView, bannerComponentTree: BannerComponentTree)

Functions

loadInstruction
Link copied to clipboard
open fun loadInstruction()
Takes the given components from the BannerText and createsa new Spannable with text / ImageSpans which is loadedinto the given TextView.