#Region Project Attributes
#ApplicationLabel: LibEx
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#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.
Dim From As String
Private MyView As JustifyTextView
Dim sv As ScrollView
Private btn1 As Button
Private btn2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example
sv.Initialize(1900dip)
Activity.AddView(sv,0,0,100%x,300%y)
sv.Panel.LoadLayout("Layout1")
If File.Exists(File.DirInternal,"from.txt") = False Then
File.Copy(File.DirAssets,"from.txt",File.DirInternal,"from.txt")
End If
From = File.ReadString(File.DirInternal, "from.txt")
MyView.SetText(From,False)
'MyView.TextSize = 10
MyView.JustifyTextColor = Colors.Cyan
MyView.setPadding(10,10,10,10)
MyView.JustifyTextGravity = MyView.GRAVITY_RIGHT
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btn2_Click
MyView.JustifyTextColor = Colors.Red
MyView.SetText(From,False)
End Sub
Sub btn1_Click
MyView.JustifyTextColor = Colors.Yellow
MyView.SetText(From,True)
End Sub