Ho creato una Activity che si apre alla pressione di un tasto ...
Ho usato la CustomListView ... ma l'activity altre a non far vedere nulla quitta l'app
Ho allegato il codice, cosa manca o e' errato?
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim clv1 As CustomListView
Dim Panel1 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
clv1.Initialize(Me, "clv1")
Panel1.AddView(clv1.AsView, 0, 0, Panel1.Width, Panel1.Height)
clv1.Add(CreateInput("Utente Facebook", clv1.AsView.Width, 50dip), 50dip, "Item #" & 1)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub clv1_ItemClick (Index As Int, Value As Object)
Activity.Title = Value
End Sub
Sub CreateInput(Text As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
p.Color = Colors.Black
Dim lbl As Label
lbl.Initialize("")
lbl.Gravity = Bit.OR(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl.Text = Text
lbl.TextSize = 16
lbl.TextColor = Colors.White
Dim et As EditText
et.Initialize("")
p.AddView(lbl, 5dip, 2dip, 150dip, Height - 4dip) 'view #0
p.AddView(et, 200dip, 2dip, 50dip, Height - 4dip) 'view #1
Return p
End Sub
Ho usato la CustomListView ... ma l'activity altre a non far vedere nulla quitta l'app
Ho allegato il codice, cosa manca o e' errato?
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim clv1 As CustomListView
Dim Panel1 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
clv1.Initialize(Me, "clv1")
Panel1.AddView(clv1.AsView, 0, 0, Panel1.Width, Panel1.Height)
clv1.Add(CreateInput("Utente Facebook", clv1.AsView.Width, 50dip), 50dip, "Item #" & 1)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub clv1_ItemClick (Index As Int, Value As Object)
Activity.Title = Value
End Sub
Sub CreateInput(Text As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
p.Color = Colors.Black
Dim lbl As Label
lbl.Initialize("")
lbl.Gravity = Bit.OR(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl.Text = Text
lbl.TextSize = 16
lbl.TextColor = Colors.White
Dim et As EditText
et.Initialize("")
p.AddView(lbl, 5dip, 2dip, 150dip, Height - 4dip) 'view #0
p.AddView(et, 200dip, 2dip, 50dip, Height - 4dip) 'view #1
Return p
End Sub