Do I need to initialize everything before I use it in basic4android?

Dim lbl as label
Dim lv1 as listview

lbl.initialize()
lv1.initialize()

lbl1.text = "Hello world!"
有帮助吗?

解决方案

Only if you are creating the layout programmatically. If you create it with the designer you do not need to initialize the views. Another case where you do not need to initialize is when you reference an already initialized view:

Dim lbl1, lbl2 As Label
lbl1.Initialize("")
lbl2 = lbl1
lbl2.Text = "efwef"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top