It wraps this Github project. Just something to highlight selected text within a string of text. Posting the B4A library files and B4A project.
Sample Code:
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: EmphasisTextView
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: landscape
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
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 etv1, etv2 As EmphasisTextView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
etv1.Text = "Napoleon said: Able was I ere I saw Elba"
etv1.TextToHighlight = "le"
etv1.TextSize = 25
etv1.CaseInsensitive = True
etv1.TextHighlightColor = "#ffffff00"
etv1.highlight
etv2.Text = "Napoleon said: Able was I ere I saw Elba"
etv2.TextToHighlight = "sa"
etv2.TextSize = 25
etv2.CaseInsensitive = True
etv2.TextHighlightColor = "#ff00ffff"
etv2.highlight
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub