public class InstructionLoader
extends java.lang.Object
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
/
Constructor and Description |
---|
InstructionLoader(android.widget.TextView textView,
com.mapbox.api.directions.v5.models.BannerText bannerText)
Creates an InstructionLoader which can handle highway shields and also takes into account
abbreviations.
|
Modifier and Type | Method and Description |
---|---|
void |
loadInstruction()
Takes the given components from the
BannerText and creates
a new Spannable with text / ImageSpan s which is loaded
into the given TextView . |
public InstructionLoader(android.widget.TextView textView, @NonNull com.mapbox.api.directions.v5.models.BannerText bannerText)
textView
- to populate with instructionbannerText
- containing components to populate into textView