Class InstructionLoader
-
- All Implemented Interfaces:
public class InstructionLoaderUtility 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/
-
-
Constructor Summary
Constructors Constructor Description InstructionLoader(TextView textView, BannerText bannerText)Creates an InstructionLoader which can handle highway shields and also takes into account abbreviations.
-
Method Summary
Modifier and Type Method Description voidloadInstruction()Takes the given components from the BannerText and creates a new Spannable with text / ImageSpans which is loaded into the given TextView.
-
-
-
Constructor Detail
-
InstructionLoader
InstructionLoader(TextView textView, BannerText bannerText)
Creates an InstructionLoader which can handle highway shields and also takes into account abbreviations.- Parameters:
textView- to populate with instructionbannerText- containing components to populate into textView
-
-
Method Detail
-
loadInstruction
void loadInstruction()
-
-