B4A Library ParticleTextView

It is a wrap for this Github project

Download rxjava-core-0.20.7.jar from the below link and copy it to your additional library folder.
https://www.dropbox.com/s/yomw2n284f7hrnl/rxjava-core-0.20.7.jar?dl=0

Posting the following:
1. B4A project
2. B4A library files - copy the 2 x jar and 1 x xml files to your additional library folder

This is donation ware. It will be available for testing until 26 May 2017.

1.gif


2.gif


Sample Code:
B4X:
#Region  Project Attributes
    #ApplicationLabel: b4aParticleTextView
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private ptv1 As ParticleTextView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("main")
  
    ptv1.TargetText = "Hello B4A"
    ptv1.Releasing = 0.1
    ptv1.ParticleRadius = 4.0
    ptv1.MiniDistance = 2
    'set the colors as strings of RGB
    Dim pca() As String = Array As String("#ff0000", "#00ff00", "#0000ff", "#ffffff")
    ptv1.ParticleColorArray = pca
    ptv1.ParticleTextSize = 100
    ptv1.RowSteps = 6
    ptv1.ColumnSteps = 6
    ptv1.Movingstrategy = 5  '0 = horizontal strategy, 1 = vertical strategy, 2 = corner strategy, 3 = random moving strategy, 4 = vertical strategy, 5 = horizontal strategy
    ptv1.Delay = 200
    'set all the above parameters before calling "setParameters"
    ptv1.setParameters
  

End Sub

Sub Activity_Resume
    ptv1.startAnimation

End Sub

Sub Activity_Pause (UserClosed As Boolean)
  
    ptv1.stopAnimation

End Sub
 

Attachments

  • ba4LibFiles.zip
    59.6 KB · Views: 183
  • b4aParticleTextView.zip
    8.1 KB · Views: 193
Last edited:
Top