B4A Library [Lib, Chargeable] Amir_RecyclerView

Carlos marin

Active Member
Licensed User
Longtime User

dear that's why I tell you that I use VisibleRangeChanged obviously I will not load 100 images at the time. but if I bring a more or less similar query and each one needs an image
 

itgirl

Active Member
Licensed User
Longtime User
dear that's why I tell you that I use VisibleRangeChanged obviously I will not load 100 images at the time. but if I bring a more or less similar query and each one needs an image
Well i really can't tell what is it exactly that you are seeking but if you are not loading a lot of images then it's not about the images being pulled from server but it's a memory wise concerning the [Views] which will cause the little [lag], in that case this Lib will definitely help, because RecyclerView reuses the views which will lower your memory usage
 

alimanam3386

Active Member
Licensed User
Longtime User

please update your android sdk , it should solve your problem.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
Can someone please explain how we can modify one item in the dataset when the recyclerview is already on the screen? I've used
B4X:
recycleList.Adapter2.notifyItemChanged(latestPosition)
but that does not (always) seem to work. Is this the correct statement? Or should something else be added?
 

fredo

Well-Known Member
Licensed User
Longtime User
...does not (always) seem to work.

Had the same effect sometimes and sleep after notify helped
B4X:
    Sleep(100)

or this after item removal
B4X:
    ' Inform the Layout manager to refresh the visible items BELOW the clicked item
    RVMain_RecyclerView.Adapter2.NotifyDataItemChanged2(Position, Position +RVMain_RecyclerView.GetVisibleItemCount)
 

alimanam3386

Active Member
Licensed User
Longtime User
Adapter is dcKeyValueList ( DataCollection lib )

B4X:
Sub Edit_Message(m As Map)
    Dim pos As Int = Adapter.IndexOfKey(m.Get("MsgId"))
    If pos <> -1 Then
        Dim msg As Message = Adapter.GetValueAt(pos)
        msg.Msg = m.Get("Msg")
        Adapter.Put(m.Get("MsgId") , msg) ' OR Adapter.Set(pos , msg)
        RV.Adapter2.NotifyItemChanged(pos)
    End If
End Sub
 
Last edited:

Carlos marin

Active Member
Licensed User
Longtime User
my other question I have a server with many images we are working on a project similar to Instagram. it is possible to do this with this library (carousel layout- two cards)
 

wimpie3

Well-Known Member
Licensed User
Longtime User
Updated to Java 8.202 (the latest version) but that doesn't change a thing.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
Well, it's definitely not working. I've switched to Java 11 (C:\Program Files\Java\jdk-11.0.2\bin\javac.exe)
And I'm using android-28 (C:\android_sdk\platforms\android-28\android.jar)

Cleaned my project and still the same error:
B4X:
PARSE ERROR:
unsupported class file version 52.0
...while parsing com/aghajari/rvplugin/Amir_RVStickyHeader.class
1 error; aborting


All other plugins for the recycleview work just fine.
 

alimanam3386

Active Member
Licensed User
Longtime User
Well, it's definitely not working. I've switched to Java 11 (C:\Program Files\Java\jdk-11.0.2\bin\javac.exe)
And I'm using android-28 (C:\android_sdk\platforms\android-28\android.jar)

All other plugins for the recycleview work just fine.

I told you I am not sure about the cause of your problem. I use JDK 10.0.1 With updated sdk without any problem ( android-28 )



https://www.dropbox.com/s/3vlk87a9diq78qa/Amir_RVStickyHeader.apk?dl=0

you should find out your problem somewhere else.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
The only difference I see is that I'm using B4A 8.0 and you're using a more recent version.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…