Android Question Spinner issue

sasidhar

Active Member
Licensed User
Longtime User
Hi,

If I don't initialize spinner list gets added to the spinner and itemclick event does not work.

If initialize spinner list not getting added to the spinner. can u please evaluate below sample code.


Dim sp As Spinner
Dim plst As List
plst.Initialize
sp.Initialize("sp")
For i=0 To 10
plst.Add("list" & i)
Next

sp.AddAll(plst)


Sub sp_ItemClick (Position As Int, Value As Object)
Msgbox(Value ,"test")
End Sub

thanks
sasidhar
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hi,

If I don't initialize spinner list gets added to the spinner and itemclick event does not work.

I would have thought that not initializing the spinner would cause an exception to be thrown when you try to execute the sp.AddAll call (unless you're adding the spinner to the Activity in the designer)...

How are you adding the spinner to your Activity? In code, or in the designer? If it's in the designer, then you shouldn't initialize it in code.

Put a breakpoint in your ItemClick event (on your MsgBox line) & then you'll know for sure if it's being fired or not. Failing that, just export the whole project & post it on here so we can see it in context.

- Colin.
 
Upvote 0
Top