Sub MakeLabel (oLabel As Label, sText As String, fLeft As Float, fTop As Float, oTypeface As Typeface, nStyle As Int) As Label
oLabel.Initialize ("")
oLabel.Text = sText
oLabel.TextSize = 24
oLabel.Textcolor = Colors.black
oLabel.Color = Colors.white
oLabel.Typeface = Typeface.CreateNew (oTypeface, nStyle)
Activity.AddView (oLabel, fLeft, fTop, 20%x, 15%y)
Return oLabel
End Sub
Sub Activity_Resume
Activity.RemoveAllViews
Private oTypefaces () As Typeface = Array As Typeface (Typeface.DEFAULT, Typeface.SANS_SERIF, Typeface.SERIF, Typeface.MONOSPACE)
Private nStyles () As Int = Array As Int (Typeface.STYLE_NORMAL, Typeface.STYLE_BOLD, Typeface.STYLE_ITALIC, Typeface.STYLE_BOLD_ITALIC)
Private LabelArray (4) As Label
For nRow = 0 To 3
For nColumn = 0 To 3
LabelArray (nRow) = MakeLabel (LabelArray (nRow), "ABCdef", nColumn * 25%x, nRow * 20%y, oTypefaces (nRow), nStyles (nColumn) )
Next
Next
Dim r As Reflector ' needs library
Private sOS As String = "OS=" & r.GetStaticField ("android.os.Build$VERSION", "SDK_INT")
Private lblInformation As Label
MakeLabel (lblInformation, sOS, 0, 85%y, oTypefaces (1), nStyles (1) )
End Sub