The attached project wraps this Github project (it is also my 50th library posting). Posting the following:
1.B4A project
2. The Java Code
3. B4A library files. The library files include android-support-annotations.jar - copy all three files to your additional library folder.
Some sample code:
SecretTextView
Author: Johan Schoeman
Version: 1
1.B4A project
2. The Java Code
3. B4A library files. The library files include android-support-annotations.jar - copy all three files to your additional library folder.
Some sample code:
B4X:
#Region Project Attributes
#ApplicationLabel: SecretTextView
#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.
Dim t As Timer
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 stv1 As SecretTextView
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")
t.Initialize("t", 5000)
stv1.Text = "This is a wrapper for https://github.com/matthewrkula/SecretTextView"
stv1.TextSize = 30.0
stv1.TextColor = Colors.Red
stv1.Duration = 3000
End Sub
Sub Activity_Resume
t.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
t.Enabled = False
End Sub
Sub t_tick
stv1.TextColor = Colors.ARGB(Rnd(200, 256), Rnd(150, 256), Rnd(150, 256), Rnd(150, 256))
stv1.toggle
End Sub
SecretTextView
Author: Johan Schoeman
Version: 1
- SecretTextView
Fields:- ba As BA
- BringToFront
- DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
- Initialize (EventName As String)
- Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetTextColorAnimated (arg0 As Int, arg1 As Int)
- SetTextSizeAnimated (arg0 As Int, arg1 As Float)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- hide
- show
- toggle
- Background As Drawable
- Color As Int [write only]
- Duration As Int [write only]
- Enabled As Boolean
- Gravity As Int
- Height As Int
- IsVisible As Boolean [write only]
- Left As Int
- Tag As Object
- Text As String
- TextColor As Int
- TextSize As Float
- Top As Int
- Typeface As Typeface
- Visible As Boolean
- Width As Int