Android Question How to stop customlistview from animating

kostefar

Active Member
Licensed User
Longtime User
Dear All,

I am trying to disable the way that customlistview shows where list entries come floating in from the topleft corner.

I have already set the Animation duration in the layout to 0, both on the component itself and on activity level, but with no result. I did the same for the panels being added with p.SetLayoutAnimated(0,0,0,0,0), but still it does the same.

Any hints?

Thanks in advance!
 

kostefar

Active Member
Licensed User
Longtime User
Where is the code that adds the items?

B4X:
clv_contacts.Add(CreateListItem_contactlist(ct,clv_contacts.AsView.Width,40dip), 40dip, ct)

and

B4X:
Sub CreateListItem_contactlist(ct As Contactentries, itemWidth As Int, itemheight As Int) As Panel
Dim p As Panel
    Log ("ct " & ct & " itemwidth " & itemWidth & " itemheight " & itemheight)
  
    p.Initialize("")
  

    Activity.AddView(p, 0, 0, itemWidth, itemheight)
  
    p.LoadLayout("contacts_cellItem")
    p.SetLayoutAnimated(0,0,0,0,0)
    p.RemoveView
 
    Return p
End Sub
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
This line does nothing useful: p.SetLayoutAnimated(0,0,0,0,0)
Have you set the animation duration in contacts_cellitem layout to 0?

I didn´t think so (about the p property), but your suggestion solved the problem - thanks!!!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…