#Region Project Attributes
#ApplicationLabel: SimplePad
#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
End Sub
Sub Globals
Dim pnlSP As Panel
pnlSP.Initialize(pnlSP)
Dim txtSP As EditText
txtSP.Initialize(txtSP)
Dim strText As String
Dim IME As IME
IME.Initialize(IME)
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.Title = " SimplePad"
Activity.Color = Colors.RGB(0, 0, 64)
Activity.AddMenuItem3(" ok ", "mnuBeenden", Null, True)
Activity.AddView(pnlSP, 0dip, 0dip, 96%x, 300%y)
pnlSP.AddView(txtSP, 2%x, 0%y, 95%x, 96%y)
If File.Exists(File.DirRootExternal & "/SimplePad", "SimplePad.txt") = False Then
File.MakeDir(File.DirRootExternal, "SimplePad")
txtSP.Text = "leer"
File.WriteString(File.DirRootExternal & "/SimplePad", "SimplePad.txt", strText)
Else
txtSP.Text = File.ReadString(File.DirRootExternal &"/SimplePad","SimplePad.txt")
End If
pnlSP.Left = 2%x
pnlSP.Top = 2%y
pnlSP.Width = 96%x
pnlSP.Height = 96%y
pnlSP.Color = Colors.rgb(0, 0, 64)
txtSP.Gravity = Gravity.TOP
txtSP.TextSize = 18
txtSP.TextColor = Colors.White
txtSP.RequestFocus
End Sub
Sub Activity_Resume
txtSP.RequestFocus
DoEvents
IME.ShowKeyboard(txtSP)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub mnuBeenden_Click
strText = txtSP.Text
File.WriteString(File.DirRootExternal & "/SimplePad", "SimplePad.txt", strText)
Activity.Finish
End Sub