CustomListView - A flexible list based on ScrollView

Status
Not open for further replies.

LucaMs

Expert
Licensed User
Longtime User
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 ?).
 

Attachments

  • lm CustomListView.zip
    11.9 KB · Views: 307

bocker77

Active Member
Licensed User
Longtime User
I have a CustomListview and want to disable the item so it will not accept an event such as a Click. I get the panel and disable it but the event still gets fired. If the event is not on the item's panel then what is it on?

pnlTemp = clvAllies.GetPanel(i)
pnlTemp.Enabled = False
 

bocker77

Active Member
Licensed User
Longtime User
After thinking about this more it became obvious that the event is on the whole listview and not on an item. So what I would like to do isn't feasible. Please disregard my question in previous post (#425).
 

bocker77

Active Member
Licensed User
Longtime User
Thanks LucaMS and Erel.

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. Also it was getting late and my head was spinning trying to fix other bugs in my program that trying to figure out one more piece of code seemed exhausting.

Erel, I went ahead and disabled all the other views that generate events in the item and made a check for the item's click and inform the user that that is not allowed. Your resolution will allow me to do what I originally wanted.

Again thanks to you both for responding to my question. It is much appreciated.
 

LucaMs

Expert
Licensed User
Longtime User
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

I forget all so quickly ...
so I'm not sure but my changes to Erel's CustomListView should not adversely interfere (in short, compatibility remains).
Few lines added.
 
Last edited:

LucianoB

Member
Licensed User
Longtime User
I' m not able to show a panel background image through a customlistview nor the background of customlistview itself. I have this code but the customlistview background color is always black instead of transparent.

B4X:
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

Any idea?
Thank you in advance.
 

Attachments

  • Screenshot_2016-05-26-16-01-31.jpg
    274.9 KB · Views: 337
Last edited:

ilan

Expert
Licensed User
Longtime User
hi

i am using CLV v1.20 in my app and i am getting in the IDE logs 3 times following line:

Class not found: net.sagital.callrec.customlistview, trying: net.vladi.callrec.customlistview

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
 

LucaMs

Expert
Licensed User
Longtime User
https://www.b4x.com/android/forum/t...g-class-not-found-messages.38603/#post-228608
 

LucaMs

Expert
Licensed User
Longtime User
Can be useful a method to set ("replace") the value of an Item? (if I'm not mistaken it is missing and I have needed it to post an example).

I added (but not tested ):
B4X:
Public Sub SetValue(Index As Int, Value As Object)
    items.RemoveAt(Index)
    items.InsertAt(Index, Value)
End Sub

If yes (if it is useful) it should be added also to "Pull to refresh"
 

Paul Edwards

Member
Licensed User
Longtime User
Hi,

How to change the background colour of an individual item before .AddTextItem ?

Paul

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…