Sub Class_Globals
Private mEventName As String 'ignore
Private mCallBack As Object 'ignore
Private mBase As Panel
Private mEdit As EditText
End Sub
Public Sub Initialize (callbackModule As Object, EventName As String)
mCallBack = callbackModule
mEventName = EventName
End Sub
Public Sub CreateUI(Base As Panel, x As Int, y As Int, w As Int, h As Int)
Log($"Base ${Base.Left} ${Base.Top} ${Base.Width} ${Base.Height}"$)
addToParent(Base, x, y, w, h)
End Sub
Public Sub addToParent(parent As Panel, x As Int, y As Int, w As Int, h As Int)
mBase = parent
mBase.Tag = Me
mBase.Color = Colors.Transparent
CreateView(x, y, w, h)
End Sub
Private Sub CreateView(x As Int, y As Int, w As Int, h As Int)
' EditText
mEdit.Initialize("Edit")
#If B4A
mEdit.Padding = Array As Int(8dip, 8dip, 8dip, 8dip)
#End If
mEdit.Text = ""
mEdit.Color = Colors.rgb(0, 255, 255)
mEdit.TextColor = Colors.Black
mEdit.Hint = "Enter Data"
mEdit.HintColor = Colors.Blue
mEdit.TextSize = 14
mEdit.SingleLine = True
mBase.AddView(mEdit, x, y, w, h)
Log($"mEdit ${mEdit.Left} ${mEdit.Top} ${mEdit.Width} ${mEdit.Height}"$)
End Sub
Public Sub setTextColor(val As Int)
mEdit.TextColor = val
End Sub