Android Question customlistview & JumpToItem

edm68

Member
Licensed User
Longtime User
Hi,
In the attached sample project I'm having a problem with JumpToItem.
It seems to work as I would like it to in debug, but not in release.
Thanks in advance for any help.
 

Attachments

  • clvTestA.zip
    8 KB · Views: 246

DonManfred

Expert
Licensed User
Longtime User
i´ve changed the layout for my test... use your own layout if you want.
The changes are:
I use Callsubutils to call a sub delayed to do the jump (after activity_create is running).

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Main")
    clv1Fill
    Starter.csu.CallSubPlus2(Me, "clv1_Jump", 250,Array("25"))
End Sub
Sub clv1Fill
    clv1.Clear
    clv1.DefaultTextColor=Colors.Black
    For i=0 To 100
        clv1.AddTextItem("i= " & i,i)
    Next
    'clv1.JumpToItem(2)   
End Sub
Sub clv1_Jump(args() As Object)
    clv1.JumpToItem(args(0))   
End Sub
 

Attachments

  • clvtest2.zip
    10.9 KB · Views: 281
Upvote 0
Top