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,519
Last edited:

jimmyF

Active Member
Licensed User
Longtime User
If we purchased to full package in September, does this mean that we must purchase the new tools that have been added?
I am asking specifically about Amir_RVToolbarParallax and Amir_RVEchelon and the updated Amir_RecyclerView
 
Last edited:

asales

Expert
Licensed User
Longtime User
If we purchased to full package in September, does this mean that we must purchase the new tools that have neen added?
I am asking specifically about Amir_RVToolbarParallax and Amir_RVEchelon and the updated Amir_RecyclerView
I have the same problem.
 

alimanam3386

Active Member
Licensed User
Longtime User
If we purchased to full package in September, does this mean that we must purchase the new tools that have been added?
I am asking specifically about Amir_RVToolbarParallax and Amir_RVEchelon and the updated Amir_RecyclerView


I have sent you the last version ( 1.0.2 )
 

wimpie3

Well-Known Member
Licensed User
Longtime User
There seems to be a problem with the recycleviewpager.

When I use PageViewer.GoToNext for the first time, PageViewer_onScrollStateChanged is fired four times with the values 2, 0, 2, 0.
Every subsequent PageViewer.GoToNext gives me 2, 0 (the way it is supposed to be). It only seems to be problematic the first time.
 

itgirl

Active Member
Licensed User
Longtime User
i have already purchased to full package Could you please send me the latest version ( 1.0.2 ) ?
 

wimpie3

Well-Known Member
Licensed User
Longtime User
Is there ANY change some bug fixes can be done on RecyclerViewPager? Either I get errors in the log (Unexpected event (missing RaiseSynchronousEvents): pageviewer_getitemcount), events are not fired, fired twice, etc... something is really buggy here...
 

alimanam3386

Active Member
Licensed User
Longtime User
Is there ANY change some bug fixes can be done on RecyclerViewPager? Either I get errors in the log (Unexpected event (missing RaiseSynchronousEvents): pageviewer_getitemcount), events are not fired, fired twice, etc... something is really buggy here...

Hi,
it is not bug to slove it , in release mode you will not even see this log. b4a generate this log in debug mode nothing to be worry.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
It's not the error in the log files that bothers me, it's the FUNCTIONALITY that is not working. I'll show you.

BUG 1: onPageChanging is not fired when you click on the button (the button send a scrolltoposition to the recycleviewpager... the pager moves but does not fire a on page changing event). The event is only fired when you swipe.
B4X:
Sub Process_Globals
End Sub

Sub Globals
Dim Recycler As Amir_RecyclerViewPager
Dim b As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
Recycler.Initializer("Amir").Horizontal.Build
Activity.AddView(Recycler,0,0,100%x,300dip)
Recycler.DefaultAdapter
Activity.Color=Colors.Black
b.Initialize("b")
b.text="Click me to advance"
Activity.AddView(b,0,300dip,100%x,100dip)
End Sub

Sub b_Click
Recycler.ScrollToPosition(Recycler.CurrentPage+1)
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub

private Sub Amir_onPageChanging (CurrentPage As Int,NewPage As Int)
Log("Page changing fired")
End Sub

Private Sub Amir_onCreateViewHolder (Parent As Panel,ViewType As Int)
Dim Label As Label
Label.Initialize("")
Parent.AddView(Label,0,0,100%x,300dip)
End Sub

Private Sub Amir_onBindViewHolder (Parent As Panel,Position As Int)
Dim Label As Label = Parent.GetView(0)
Label.TextColor=Colors.White
Label.TextSize=20
Label.Gravity=Gravity.CENTER
Label.Text="ViewPager Item : "&(Position+1)
Parent.Height=300dip
End Sub

Private Sub Amir_GetItemCount As Int
Return 50
End Sub

Bug 2: onScrollStateChanged is fired twice the first time after a GoToNext command. You will clearly see 2,0,2,0 in the logs (+log file shows a red message). So the entire view is actually scrolling TWO slides away from the current slide instead of one. Next time you click on the button, it shows 2,0 and correctly goes to the next slide.
B4X:
Sub Process_Globals
End Sub

Sub Globals
Dim Recycler As Amir_RecyclerViewPager
Dim b As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
Recycler.Initializer("Amir").Horizontal.Build
Activity.AddView(Recycler,0,0,100%x,300dip)
Recycler.DefaultAdapter
Activity.Color=Colors.Black
b.Initialize("b")
b.text="Click me to advance"
Activity.AddView(b,0,300dip,100%x,100dip)
Recycler.ScrollToPosition(20)
End Sub

Sub b_Click
Recycler.GoToNext
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub

Sub Amir_onScrollStateChanged (NewState As Int)
Log(NewState)   
End Sub

Private Sub Amir_onCreateViewHolder (Parent As Panel,ViewType As Int)
Dim Label As Label
Label.Initialize("")
Parent.AddView(Label,0,0,100%x,300dip)
End Sub

Private Sub Amir_onBindViewHolder (Parent As Panel,Position As Int)
Dim Label As Label = Parent.GetView(0)
Label.TextColor=Colors.White
Label.TextSize=20
Label.Gravity=Gravity.CENTER
Label.Text="ViewPager Item : "&(Position+1)
Parent.Height=300dip
End Sub

Private Sub Amir_GetItemCount As Int
Return 50
End Sub
 
Last edited:
Top