B4A Library [Lib, Chargeable] Amir_RecyclerView

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

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:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…