B4A Library [Lib] UltimateListView

Informatix

Expert
Licensed User
Longtime User
I need a project to try because I don't understand what could be gray if everything is white.
And please contact me by email as it is very difficult to follow a discussion per user and exchange files in this forum.
 

Informatix

Expert
Licensed User
Longtime User
B4X:
Sub Item_LayoutCreator(LayoutName As String, LayoutPanel As Panel)
            LayoutPanel.Color = Colors.White
            LayoutPanel.LoadLayout("lay_menu_details")
You should place the color change after loading the layout or it will be ignored (because it is replaced by the background color of the layout). That won't solve the problem as I see that you set the color to white in the designer.
Another important thing to mention : you should set AnimationDuration to zero in the designer as it slows down the list. This setting by default is really evil. Why did Erel changed this value some day?
 

MarcoRome

Expert
Licensed User
Longtime User

I tried to set the color ( see code ) and change animation to 0, but nothing changes.
B4X:
                        ..........................
                        preleva.Put("log_picture_food" & i, cur.Get("picture_food"))
                        If GetDeviceLayoutValues.ApproximateScreenSize < 4 Then
                            ULV.AddLayout("TEST", "Item_LayoutCreator", "Item_ContentFiller", 33%y, True)
                        Else If GetDeviceLayoutValues.ApproximateScreenSize > 4 And GetDeviceLayoutValues.ApproximateScreenSize < 8 Then
                            ULV.AddLayout("TEST", "Item_LayoutCreator", "Item_ContentFiller", 33%y, True)   
                        Else If GetDeviceLayoutValues.ApproximateScreenSize > 8 Then
                            ULV.AddLayout("TEST", "Item_LayoutCreator", "Item_ContentFiller", 20%y, True)
                        End If
                       
                        ULV.BulkAddItems(1, "TEST", 0)
            Next
           Activity.Color = Colors.White
 

Bryanne Vega

Member
Licensed User
Longtime User
On the slide to reveal options, are the options unlimited? or you can only put a specific amount of views?
 

Informatix

Expert
Licensed User
Longtime User
A new version is available for download:

Changelog v4.06:
- I removed the layout id from the Tag property of item panels (you can use this property now as you wish);
- I fixed a bug when the list is empty;
- I fixed an issue in the Editor demo;
- The checkbox of ClsExplorerForULV is now a bit larger (45dip).
 

Bryanne Vega

Member
Licensed User
Longtime User
I've tried handling an on Click event but cant seem to find out how, would anyone give a simple example on getting a click/longclicked panel?
 

Informatix

Expert
Licensed User
Longtime User
I've tried handling an on Click event but cant seem to find out how, would anyone give a simple example on getting a click/longclicked panel?
You should start by reading the User's Guide (there's a chapter on the subject: User Actions) then look at the numerous examples implementing a Click event. The tutorial is also a good starting point. There's a Click event handler in MyFirstList1, which is the most basic example that you can find.

Please note that I prefer to exchange by email for support.
 

Bryanne Vega

Member
Licensed User
Longtime User
ItemClick is not working.

Are never called when using the animation, I cant click an item, only swipe them.

B4X:
Sub SlidingPanel_Click ()

End Sub

Sub ULV_ItemClick(ItemID As Long, Position As Int, ClickedPanel As Panel)

End Sub
 

Informatix

Expert
Licensed User
Longtime User
There's a big difference between "this is not working" and "I don't know how to do this" (or its variant: "I probably did a mistake somewhere"). Concerning ULV, the second sentence is the right explanation in 99 cases on 100. I answer to your case by email.
 

Dave O

Well-Known Member
Licensed User
Longtime User
For what it's worth, ItemClick in 4.06 works fine for me, though I'm not using animation or swipe.

Also, EmptyView now works perfectly. Thanks!
 

Bryanne Vega

Member
Licensed User
Longtime User
For what it's worth, ItemClick in 4.06 works fine for me, though I'm not using animation or swipe.

Also, EmptyView now works perfectly. Thanks!

Swipe is a little conflicting with click since SwipePanel_Touch() is blocking all touch events.
 

Informatix

Expert
Licensed User
Longtime User
Swipe is a little conflicting with click since SwipePanel_Touch() is blocking all touch events.
Not at all. In the DismissConfirm example, the goal of the sliding panel is to intercept all touch events so the buttons that are masked below the panel do not receive any event (the panel hides them so it would be weird if these buttons were activated while hidden). To block the touch events, I created an empty Touch event handler for the panel. BUT this event handler can handle clicks if you need to, as I explained in my email. It's a touch event handler, so it receives touch events. There's absolutely no conflict with anything and it's not even related to ULV. Trying to detect an ItemClick while you have three views inside the item panel that intercept clicks (two buttons+1 panel), moreover with one of these views that covers the whole area of the item, has no chance of success. But who cares? You can detect these clicks at the sliding panel level.
 

itgirl

Active Member
Licensed User
Longtime User
hello thanks for the update just one question after i update in the sub Item_Filler(ItemID As Long, LayoutName As String, LayoutPanel As Panel, Position As Int)

i always get the LayoutPanel null [(BALayout): Layout not available]
even in the example files the same ?!
 

Informatix

Expert
Licensed User
Longtime User
It does not mean that the panel is null, only that you cannot access its BALayout properties because it is not (and never was) a B4A panel. For example, trying to get its Top value or trying to change its width leads to a crash. It's normal.
 

itgirl

Active Member
Licensed User
Longtime User
It does not mean that the panel is null, only that you cannot access its BALayout properties because it is not (and never was) a B4A panel. For example, trying to get its Top value or trying to change its width leads to a crash. It's normal.
yes thats exactly what i was trying to do to change the height of the panel and if i add try and catch then the height is changed and i avoid the crash but i was wondering if there's something else i can do to fix this
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…