B4A Library [Lib, Chargeable] Amir_RecyclerView

New b4a library! :)

RecyclerView, an important part of the sdk and android for making a custom list with better Layout , animation , and fixed for large data set.


Amir_RecyclerView released new version that we call it AX_RecyclerView.

version 1.0.8 is last update for Amir_RecyclerView and we will work on AX_RecyclerView only in future.


RecyclerView Android X : https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView

"RecyclerView is part of the v7 support library which means you can use it on anything that has api 7 and up"

543434345345.jpg



Advantages of using recyclerview instead listview:
  • ViewHolder Pattern
In a ListView, it was recommended to use the ViewHolder pattern but it was never a compulsion. In case of RecyclerView, this is mandatory using the RecyclerView.ViewHolder class. This is one of the major differences between the ListView and the RecyclerView.​

  • LayoutManager
This is another massive enhancement brought to the RecyclerView. In a ListView, the only type of view available is the vertical ListView. There is no official way to even implement a horizontal ListView.​
Now using a RecyclerView, we can have a:​
i) LinearLayoutManager - which supports both vertical and horizontal lists,​
ii) StaggeredLayoutManager - which supports Pinterest like staggered lists,​
iii) GridLayoutManager - which supports displaying grids as seen in Gallery apps.​
And the best thing is that we can do all these dynamically as we want.​

  • Item Animator
ListViews are lacking in support of good animations, but the RecyclerView brings a whole new dimension to it. Using the RecyclerView.ItemAnimator class, animating the views becomes so much easy and intuitive.​

  • Item Decoration
In case of ListViews, dynamically decorating items like adding borders or dividers was never easy. But in case of RecyclerView, the RecyclerView.ItemDecorator class gives huge control to the developers but makes things a bit more time consuming and complex.​

  • OnItemTouchListener
Intercepting item clicks on a ListView was simple, thanks to its AdapterView.OnItemClickListener interface. But the RecyclerView gives much more power and control to its developers by the RecyclerView. OnItemTouchListener but it complicates things a bit for the developer.​


For more info:
https://developer.android.com/reference/android/support/v7/widget/RecyclerView

You can add plugins as library and connect it to Amir_RecyclerView using a line of code

Current Plugins :
  • Amir_RVHeaderFooter
  • Amir_RVToolbarParallax
  • Amir_RVEmptyView
  • Amir_RVCardSlider
  • Amir_RVCarousel
  • Amir_RVDiscrete
  • Amir_RVExpandable
  • Amir_RVFanLayout
  • Amir_RVFeature
  • Amir_RVItemPicker ( deprecated )
  • Amir_RVLayoutAnimation
  • Amir_RVMultiSelection
  • Amir_RVParallax
  • Amir_RVRefreshLayout
  • Amir_RVShimmer
  • Amir_RVSkidRight
  • Amir_RVSwipeCards
  • Amir_RVVegaLayout
  • Amir_RVEchelon
  • Amir_WearableRecyclerView
  • Amir_RVDragItem
  • Amir_RVStickyHeader
  • AX_RecyclerViewPager ( deprecated )
  • Amir_RVAnimators
  • AX_RVSelection
  • AX_RVItemPicker
  • AX_RVPageIndicator
  • Amir_RVChipsLayoutManager
  • AX_RVSwipeLayout 1.00
  • AX_RVHeaderParallax
  • Amir_RVCardViewAdapter
  • Amir_RVExpandableStickyHeader
  • Amir_RVOverScroll
  • AX_RVFastScroller
  • AX_RVHeightStaggeredGrid
  • Amir_RVDragAndSwipe ( NEW )

Demo and samples how to use :

Download the DEMO.apk ( updated in 28th of July 2019 )
Download Demo Source Code

Extra Samples are here


Current version of Amir_RecyclerView : 1.2.0

Be sure to check the apk sample before purchasing.


You can have this fantastic library just with $25 ( only Amir_RecyclerView )
Full packages include all plugins only $35

Short documentations attached , special thanks to fredo

After your purchase please send me an email with your purchase detail ( [email protected] )

 

Attachments

  • Amir_RecyclerView_FullPackage_1.0.2.LIBDOC.zip
    61.1 KB · Views: 1,500
Last edited:

msali

Member
Licensed User
Longtime User
in ios we don't have recyclerview so you can't use this library in b4i.

any plan to do so in near future since that would make the application look so different between iOS and this wonderful Android look & feel.
 

asales

Expert
Licensed User
Longtime User
I get some errors in this samples:

Amir_RVItemPicker:
B4X:
java.lang.IndexOutOfBoundsException: Invalid item position 0(0). Item count:0 com.aghajari.rv.RecyclerView{877be93 VFED..... ......I. 0,0-0,0}, adapter:com.aghajari.rvplugins.Amir_RVItemPicker$Amir_RVItemPickerAdapter@fbf1ed0, layout:com.aghajari.rvplugins.PickerLayoutManager@4a3aec9, context:android.app.Application@168d9ce

Amir_RVShimmer:
B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.ViewGroup.getChildAt(int)' on a null object reference

Amir_RVMultiSelection / CountSize:
B4X:
java.lang.Exception: Sub onscanfinished was not found.

Amir_RVMultiSelection / CountSize + Focus:
B4X:
Recycler.UpdateViews  'Unknown member: UpdateViews
- - - - - - 
java.lang.Exception: Sub onscanfinished was not found.

Amir_RVMultiSelection / Selection:
B4X:
java.lang.Exception: Sub onscanfinished was not found.

The others samples is OK.
 

alimanam3386

Active Member
Licensed User
Longtime User
Amir_RVMultiSelection / CountSize:
B4X:
java.lang.Exception: Sub onscanfinished was not found.

Amir_RVMultiSelection / CountSize + Focus:
B4X:
Recycler.UpdateViews  'Unknown member: UpdateViews
[/QUOTE]


Check your inbox
 

asales

Expert
Licensed User
Longtime User
In the first example (Amir_RecyclerView / RecyclerView / Sample / RecyclerView) I tried to load a layout created in the Designer, instead by code, and I get this error:
B4X:
java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting

I only changed this (the code is attached):
B4X:
Private Sub Amir_onCreateViewHolder (Parent As Panel,ViewType As Int)
'    Dim Panel As Panel
'    Panel.Initialize("")
'    Parent.AddView(Panel,10dip,10dip,Parent.Width-20dip,430dip)
' 
'    Dim img As ImageView
'    img.Initialize("")
'    Panel.AddView(img,0,0,Panel.Width,Panel.Height)
'
'    Dim Title As Label
'    Title.Initialize("")
'    Panel.AddView(Title,20dip,Panel.Height-150dip,Panel.Width-40dip,50dip)
'
'    Dim Text As Label
'    Text.Initialize("")
'    Panel.AddView(Text,20dip,Panel.Height-100dip,Panel.Width-40dip,100dip)
  
    Parent.LoadLayout("1")
End Sub
What I doing wrong?
 

Attachments

  • RecyclerViewSample1.zip
    10.1 KB · Views: 256

alimanam3386

Active Member
Licensed User
Longtime User
In the first example (Amir_RecyclerView / RecyclerView / Sample / RecyclerView) I tried to load a layout created in the Designer, instead by code, and I get this error:
B4X:
java.lang.IllegalArgumentException: You must not call setTag() on a view Glide is targeting

I only changed this (the code is attached):
B4X:
Private Sub Amir_onCreateViewHolder (Parent As Panel,ViewType As Int)
'    Dim Panel As Panel
'    Panel.Initialize("")
'    Parent.AddView(Panel,10dip,10dip,Parent.Width-20dip,430dip)
'
'    Dim img As ImageView
'    img.Initialize("")
'    Panel.AddView(img,0,0,Panel.Width,Panel.Height)
'
'    Dim Title As Label
'    Title.Initialize("")
'    Panel.AddView(Title,20dip,Panel.Height-150dip,Panel.Width-40dip,50dip)
'
'    Dim Text As Label
'    Text.Initialize("")
'    Panel.AddView(Text,20dip,Panel.Height-100dip,Panel.Width-40dip,100dip)
 
    Parent.LoadLayout("1")
End Sub
What I doing wrong?


Add this line of code before LoadImage(img,Position) ( line 76)

When you use layout designer with an imageView inside it, if you use Amir_Glide to load a bitmap into imageView, you should set imageview.Tag = Null before loading that bitmap.

123123.jpg
 
Last edited:

asales

Expert
Licensed User
Longtime User
Can you put an example of the effect of the button with heart/cancel (Like & DisLike)?:

like_dislike3.jpg


Thanks!
 

itgirl

Active Member
Licensed User
Longtime User
Great lib really i just tried the Google play ex its amazing really, Already sent $25, thanks for this great lib
 

jimmyF

Active Member
Licensed User
Longtime User
PayPal just advised me they have sent you a payment for full package including all plugins.
 
Top