Public Sub Initialize (vCallback As Object, vEventName As String)
sv.Initialize2(0, "sv")
items.Initialize
panels.Initialize
dividerHeight = 2dip
EventName = vEventName
CallBack = vCallback
sv.Color = 0xFFD9D7DE 'this sets the dividers color
Dim r As Reflector
Dim idPressed As Int
idPressed = r.GetStaticField("android.R$drawable", "list_selector_background")
r.Target = r.GetContext
r.Target = r.RunMethod("getResources")
pressedDrawable = r.RunMethod2("getDrawable", idPressed, "java.lang.int")
DefaultTextColor = Colors.White
DefaultTextSize = 16
DefaultTextBackgroundColor = Colors.Black
End Sub
'Returns a view object that holds the list.
Public Sub AsView As View
Return sv
End Sub
Public Sub DesignerCreateView(base As Panel, lbl As Label, props As Map)
base.AddView(sv, 0, 0, base.Width, base.Height)
End Sub
Public Sub Initialize(Module As Object, EventName As String)
mModule = Module
mEventName = EventName
End Sub
Public Sub AddToParent(Parent As Panel, Left As Int, Top As Int, Width As Int, Height As Int, Text As String)
myButton.Initialize("myButton")
Parent.AddView(myButton, Left, Top, Width, Height)
myButton.Text = Text
End Sub
Public Sub DesignerCreateView(base As Panel, lbl As Label, props As Map)
AddToParent(base, 0, 0, base.Width, base.Height, lbl.Text)
End Sub
Sub Activity_Create(FirstTime As Boolean)
LittleButton.Initialize(Me, "Button")
LittleButton.AddToParent(Activity, 50dip, 20dip, 120dip, 50dip, "Hello")
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main") 'Designer only
LittleButton.Text = "Designer"
LittleButton.Width = 50%x
LittleButton.Height = 50dip
End Sub
Sub Activity_Create(FirstTime As Boolean)
LittleButton.Initialize(Me, "TheButton") 'Manual only
LittleButton.AddToParent(Activity, 50dip, 20dip, 120dip, 50dip) 'Manual only
LittleButton.Text = "Designer"
LittleButton.Width = 50%x
LittleButton.Height = 50dip
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?