Android Question CreditsRollView library

Guenter Becker

Active Member
Licensed User
This lib is developed by DonManfred. It's an excellent job as well like others he did before. Thankyou DonManfred.
After finishing the rolling text animation stopped. Tried to play with the code of the example but get my request not solved.
I like to get the animation endless rolling by reseting the text position to the start. I tried:

Endless repeat:
Sub timer_Tick
    If creditsPos < creditsMax Then
        creditsPos = creditsPos +1
    Else
        creditsPos = 0
    End If
    'Log((creditsPos/1000))
    If (creditsPos/1000) >= 1 Then
        tmr.Enabled = False
    Else
        tmr.Enabled = True
    End If
    credits.ScrollPosition = (creditsPos/1000)
    credits.DistanceFromText = 50dip
    credits.Angle = 20
    credits.Height = 100%y
    credits.Width = 100%x
    credits.TextSize = 30
    
End Sub



Question:
Does anyone know how it is possible to make it an endles repeating rolling?
 

DonManfred

Expert
Licensed User
Longtime User
As the library is from 2015 i know i do not have the Source anymore (HDD Crash 2016).
I can not help here even not editing something.
I suggest not to use it if the Lib does not meet your needs.
 
Upvote 0

Guenter Becker

Active Member
Licensed User
I found a working solution:

1. Step
Create own sub to initialize creditrollview:
Sub iniCreditView
    CreditsRollView1.TextColor = Colors.blue
    CreditsRollView1.EndScrollMult = 2.5
    CreditsRollView1.DistanceFromText = 50dip
    CreditsRollView1.Angle = 20
    CreditsRollView1.Height = 100%y
    CreditsRollView1.Width = 100%x
    CreditsRollView1.TextSize = 24
    CreditsRollView1.Text = $"
    Flightassistant
    Version 2020
    
    The swiss knife for the pilots.
    
    (C) TechDoc G. Becker
    http://www.gbecker.de/techdoc.html
    mail: [email protected]
    
    Developed with Anywhere Software B4A
    
    Special Credits to the Forum Members:
    Erel,
    DonManfred,
    Mahares,
    Claudio Oliveira.
    
    Thank you for your kind support.
    
    (C) All Images and Clipart are
    Royalty Free for commercial use.
    
    Find App Manual on our Hompage
    http://www.gbecker.de/FA.html
    "$
    tmr.Initialize("timer",50)
    tmr.Enabled = True
End Sub

2. Step call iniCreditView in Activity/Page create after load layout

3. Step modify timer tick as followes:
timer tick event:
Sub timer_Tick
    If creditsPos < creditsMax Then
        creditsPos = creditsPos +1
    End If
    If (creditsPos/1000) >= 0.6 Then
        creditsPos=0
        tmr.Enabled=False
        iniCreditView
    Else
        CreditsRollView1.ScrollPosition = (creditsPos/1000)
    End If
End Sub

Voila, that's it. The trick is to reinit the CreditScrollView object.
 
Upvote 0
Top