Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
EditText1.RequestFocus
End Sub
Private Sub EditText1_TextChanged (Old As String, New As String)
'Note: In designer, I set EditText1 to expect DECIMAL input. On numeric keyboards the minus sign requires two clicks on my Samsung device
If New = "-" Then EditText1.TextColor = xui.Color_Red
Dim k As Int = New.IndexOf(".")
If k > -1 Then
If New.Length - k > 3 Then
EditText1.Text = Old
EditText1.SelectionStart = Old.length
End If
End If
End Sub
Private Sub EditText1_EnterPressed
Log(EditText1.Text)
EditText1.Text = ""
EditText1.TextColor = xui.Color_Black
End Sub