B4A Library Linker

Discussion in 'Additional libraries, classes and official updates' started by DonManfred, Apr 16, 2019.

  1. DonManfred

    DonManfred Expert Licensed User

    This is a wrap for this Github Project.


    Lightweight android library for
    highlighting sections of a textview

    Author: DonManfred
    Version: 0.01
    • LinkProfile
      • Functions:
        • Initialize (charSequence As String, linkColor As Int, underlineMode As Boolean)
        • IsInitialized As Boolean
      • Properties:
        • LinkColor As Int
        • UnderlineMode As Boolean
    • Linker
      • Events:
        • onLinkClick (charSequenceClicked As String)
      • Functions:
        • addProfiles (list As java.util.List)
        • addStrings (strings As java.util.List)
        • clearLinksList
        • Initialize (EventName As String, txtView As android.widget.TextView)
        • setLinkColorForCharSequence (charSequenceIn As String, color As Int)
        • setUnderlineModeForCharSequence (charSequenceIn As String, whether As Boolean)
        • update
      • Properties:
        • AllLinkColors As Int [write only]
        • AllLinkUnderline As Boolean [write only]
        • Profiles As java.util.ArrayList [read only]

    Sub Process_Globals
    'These global variables will be declared once when the application starts.
        'These variables can be accessed from all modules.
        Public linker As Linker
    End Sub
    Sub Globals
    'These global variables will be redeclared each time the activity is created.
        'These variables can only be accessed from this module.
        Private lblText As Label
    End Sub
    Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
        lblText.Text = 
    "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
    Dim l As List
    Dim link As LinkProfile
    "Lorem ipsum dolor",Colors.Red,True)
    Dim link As LinkProfile
    "consetetur sadipscing elitr",Colors.Blue,True)

    Dim link As LinkProfile
    "sed diam",Colors.Yellow,True)

    Dim tl As List
    "sed diam voluptua")
    End Sub
    Sub Linker_onLinkClick(charSequenceClicked As String)
    End Sub
    WhatsApp Image 2019-04-16 at 18.38.56.jpeg

    Attached Files:

    Last edited: Apr 16, 2019
  2. Peter Simpson

    Peter Simpson Expert Licensed User

    I'll give this a go now, cheers :D
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice