Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim label1 As Label
label1.Initialize("")
Activity.AddView(label1,0,0,90%x,5%y)
label1.Background = My_Background(Colors.Blue,5dip,2dip,Colors.White)
label1.Tag = label1.Width & "," & label1.Height & "," & Colors.blue & "," & 5dip & "," & 2dip & "," & Colors.White
Dim label2 As Label = Clone_Label(label1.Tag)
Activity.AddView(label2,0,6%y,90%x,5%y)
label1.Text = "I AM LABEL NUMBER 1"
label2.Text = "I AM LABEL NUMBER 2"
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Clone_Label (target As String) As Label
Dim MyView As Label
MyView.Initialize("")
Dim value() As String
value = Regex.Split(",",target)
MyView.Width = value(0)
MyView.Height = value(1)
MyView.Background = My_Background(value(2),value(3),value(4),value(5))
MyView.Tag = target
Return MyView
End Sub
Sub My_Background (backcolor As Int, radius As Int, borderwidth As Int, bordercolor As Int) As ColorDrawable
Dim cd As ColorDrawable
cd.Initialize2(backcolor,radius,borderwidth,bordercolor)
Return cd
End Sub