Class InstructionLoader

  • All Implemented Interfaces:

    
    public 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/

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      InstructionLoader(TextView textView, BannerText bannerText) Creates an InstructionLoader which can handle highway shields and also takes into account abbreviations.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void loadInstruction() Takes the given components from the BannerText and creates a new Spannable with text / ImageSpans which is loaded into the given TextView.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 instruction
        bannerText - containing components to populate into textView