On a Windows system, I installed SMM Example2 from :
https://www.b4x.com/android/forum/t...rk-for-images-videos-and-more.134716/#content
In the B4J version, I added the following line in the sub CustomListView1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int) :
After execution of the program, I find in the Log :
which means that the program loaded 6 rows of photos (although the visible part of the CLV counts only 3 rows).
From my understanding, something is strange that the program loads 6 rows instead of 3.
Is there a explanation ?
In a second trial, I remove (always in the same Sub) the line :
And I replace it by :
Execution should be the same ! In this case, i find in the Log :
Number of lines is "coherent" BUT nothing appears in the Form.
How to explain that ?
Last question :
In the line
when I move the mouse on "GetRawListItem", it is noted
"Returns the CLVItem. Should not be used in most cases"
What are the cases when this instruction should not be used ?
Thanks
https://www.b4x.com/android/forum/t...rk-for-images-videos-and-more.134716/#content
In the B4J version, I added the following line in the sub CustomListView1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int) :
B4X:
Log("i= " & i & " FirstIndex= " & FirstIndex & " LastIndex= " & LastIndex)
After execution of the program, I find in the Log :
B4X:
Waiting for debugger to connect...
Program started.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
i= 0 FirstIndex= 0 LastIndex= 2
i= 1 FirstIndex= 0 LastIndex= 2
i= 2 FirstIndex= 0 LastIndex= 2
i= 3 FirstIndex= 0 LastIndex= 2
i= 4 FirstIndex= 0 LastIndex= 2
i= 5 FirstIndex= 0 LastIndex= 2
From my understanding, something is strange that the program loads 6 rows instead of 3.
Is there a explanation ?
In a second trial, I remove (always in the same Sub) the line :
B4X:
For Each i As Int In PCLV.VisibleRangeChanged(FirstIndex, LastIndex)
And I replace it by :
B4X:
Dim i as Int
For i = FirstIndex to LastIndex
Execution should be the same ! In this case, i find in the Log :
B4X:
Program started.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
i= 0 FirstIndex= 0 LastIndex= 2
i= 1 FirstIndex= 0 LastIndex= 2
i= 2 FirstIndex= 0 LastIndex= 2
Number of lines is "coherent" BUT nothing appears in the Form.
How to explain that ?
Last question :
In the line
B4X:
Dim item As CLVItem = CustomListView1.GetRawListItem(i)
"Returns the CLVItem. Should not be used in most cases"
What are the cases when this instruction should not be used ?
Thanks