If I'm not mistaken, there is not a way to disable an Item and there is not an ItemLongClick event.
I made these changes.
Again if I'm not mistaken, my changes do not affect the original functionalities, so Erel could remove my comments (LM 1.0...) and update his version (to 1.21 ?).
I have a CustomListview and want to disable the item so it will not accept an event such as a Click
If I'm not mistaken, there is not a way to disable an Item and there is not an ItemLongClick event.
I made these changes.
LucaMS, I thought your changes that you have made to the CustomListView in post #424 was referring to just what I was wanting but was a little leery of replacing Erel's CustomListView
clv1.Initialize(Me, "clv1")
pnlHistory.AddView(clv1.AsView, 0, 0, 100%x, 90%y)
Dim listHistory As List
listHistory.Initialize2(File.ReadList(File.DirAssets ,"History.txt"))
For i = 0 To listHistory.Size -1
clv1.AddTextItem(listHistory.Get(i),"") 'if I comment out this line then clv becomes transparent and shows panel background
Next
clv1.DefaultTextBackgroundColor = Colors.Transparent
clv1.AsView.Color = Colors.Transparent
' clv1.AsView.SetBackgroundImage(LoadBitmap( File.DirAssets, "background.jpg")) ' this doesn't set background
Class not found: net.sagital.callrec.customlistview, trying: net.vladi.callrec.customlistview
Try to clean the project:
https://www.b4x.com/android/forum/threads/resources-error.18084/#post-103902
https://www.b4x.com/android/forum/t...g-class-not-found-messages.38603/#post-228608hi
i am using CLV v1.20 in my app and i am getting in the IDE logs 3 times following line:
the app package name was in the beginning net.sagital.callrec then it was changed to net.vladi.callrec
i have removed the module CLV and also deleted it from the app folder and the imported it again after i changed the package name
can someone tell me why it is still trying to call it from the old package name and then from the new?
i need to mention that everything is working but the logs are just not clear for me
thanx, ilan
Public Sub SetValue(Index As Int, Value As Object)
items.RemoveAt(Index)
items.InsertAt(Index, Value)
End Sub
The native ListView is a optimized for very large lists. Instead of creating the views for each item, it reuses the same views when possible. This optimization makes it very difficult to customize the items.
CustomListView is an implementation of a list based on ScrollView.
CustomListView is suited for lists of up to 1000 or 2000 items.
Advantages of CustomListView:
- Each item is made of a Panel that can hold any views.
- Items can be modified at any time.
- It is possible to insert or remove items from any position.
- Each item can have a different height.
- Items height can be set automatically based on the text (using AddTextItem).
Using CustomListView is simple:
- First you should initialize the list and add it to a panel or activity.
- Then you should add items.
Each item is made of a panel that holds other views.
AddTextItem is a convenient utility to add items made of a single label.
The attached example creates two lists:
View attachment 41397
The first list is made of simple text items.
In the second list each item is created by loading another layout file.
A nice advantage of using a layout file to create the cell, is that it allows us to use anchors and designer script to create a flexible layout that changes based on the screen size. Rotate the device to landscape to see it.
This class depends on the JavaObject and StringUtils libraries.
V1.20 - Better designer support. Example code simplified.
V1.10 - Adds designer support. CustomListView can now be added with the visual designer. Add a CustomView and then set its CustomType property to CustomListView.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?