B4A Library Animated SVG View

It wraps this Github project. Posting the following:
1. B4A project for demonstration purposes
2. B4A library files - copy them to your additional library folder

I have added Google, Twitter, Github, jRummyApps,and BusyBox - create/download your own and add it to the B4A code.

1.gif


Sample Code:

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

'#AdditionalRes: ..\resource
'#AdditionalRes: C:\Users\----------2\Documents\Basic 4 Android\JOHAN APPS\JHS LIBS\resource\b4a_appcompat, de.amberhome.objects.appcompat
'#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
'#Extends: android.support.v7.app.AppCompatActivity

#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.
     Dim t As Timer

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 asvgv1 As AnimatedSvgView
    Private asvgv2 As AnimatedSvgView
    Private asvgv3 As AnimatedSvgView
    Private asvgv4 As AnimatedSvgView
    Private asvgv5 As AnimatedSvgView

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")
    t.Initialize("t",5000)

    'Google
    asvgv1.GlyphStrings = Array As String("M142.9,24.2c40.2-13.9,85.3-13.6,125.3,1.1c22.2,8.2,42.5,21,59.9,37.1c-5.8,6.3-12.1,12.2-18.1,18.3 c-11.4,11.4-22.8,22.8-34.2,34.2c-11.3-10.8-25.1-19-40.1-23.6c-17.6-5.3-36.6-6.1-54.6-2.2c-21,4.5-40.5,15.5-55.6,30.9 c-12.2,12.3-21.4,27.5-27,43.9c-20.3-15.8-40.6-31.5-61-47.3C59,73.6,97.6,39.7,142.9,24.2z", _
                                          "M21.4,163.2c3.3-16.2,8.7-32,16.2-46.8c20.3,15.8,40.6,31.5,61,47.3c-8,23.3-8,49.2,0,72.4 c-20.3,15.8-40.6,31.6-60.9,47.3C18.9,246.7,13.2,203.6,21.4,163.2z", _
                                          "M203.7,165.1c58.3,0,116.7,0,175,0c5.8,32.7,4.5,66.8-4.7,98.8c-8.5,29.3-24.6,56.5-47.1,77.2 c-19.7-15.3-39.4-30.6-59.1-45.9c19.5-13.1,33.3-34.3,37.2-57.5c-33.8,0-67.6,0-101.4,0C203.7,213.5,203.7,189.3,203.7,165.1z", _
                                          "M37.5,283.5c20.3-15.7,40.6-31.5,60.9-47.3c7.8,22.9,22.8,43.2,42.6,57.1c12.4,8.7,26.6,14.9,41.4,17.9 c14.6,3,29.7,2.6,44.4,0.1c14.6-2.6,28.7-7.9,41-16.2c19.7,15.3,39.4,30.6,59.1,45.9c-21.3,19.7-48,33.1-76.2,39.6 c-31.2,7.1-64.2,7.3-95.2-1c-24.6-6.5-47.7-18.2-67.6-34.1C67,328.9,49.6,307.5,37.5,283.5z")

    asvgv1.FillColors = Array As Int(0xFFEA4335, 0xFFFBBC05, 0xFF4285F4, 0xFF34A853)
    asvgv1.setViewportSize(400,400)


    asvgv1.TraceResidueColor = 0x32000000
    asvgv1.TraceColor = Colors.Black
    asvgv1.rebuildGlyphData()
    asvgv1.start()
  

    'Github
    asvgv2.GlyphStrings = Array As String("M256 70.7c-102.6 0-185.9 83.2-185.9 185.9 0 82.1 53.3 151.8 127.1 176.4 9.3 1.7 12.3-4 12.3-8.9V389.4c-51.7 11.3-62.5-21.9-62.5-21.9 -8.4-21.5-20.6-27.2-20.6-27.2 -16.9-11.5 1.3-11.3 1.3-11.3 18.7 1.3 28.5 19.2 28.5 19.2 16.6 28.4 43.5 20.2 54.1 15.4 1.7-12 6.5-20.2 11.8-24.9 -41.3-4.7-84.7-20.6-84.7-91.9 0-20.3 7.3-36.9 19.2-49.9 -1.9-4.7-8.3-23.6 1.8-49.2 0 0 15.6-5 51.1 19.1 14.8-4.1 30.7-6.2 46.5-6.3 15.8 0.1 31.7 2.1 46.6 6.3 35.5-24 51.1-19.1 51.1-19.1 10.1 25.6 3.8 44.5 1.8 49.2 11.9 13 19.1 29.6 19.1 49.9 0 71.4-43.5 87.1-84.9 91.7 6.7 5.8 12.8 17.1 12.8 34.4 0 24.9 0 44.9 0 51 0 4.9 3 10.7 12.4 8.9 73.8-24.6 127-94.3 127-176.4C441.9 153.9 358.6 70.7 256 70.7z")
    asvgv2.FillColor = Colors.Black
    asvgv2.setViewportSize(512,512)
    asvgv2.TraceResidueColor = 0x32000000
    asvgv2.TraceColor = Colors.Black
    asvgv2.rebuildGlyphData()
    asvgv2.start()

  
    'Twitter
    asvgv3.GlyphStrings = Array As String("m 1999.9999,192.4 c -73.58,32.64 -152.67,54.69 -235.66,64.61 84.7,-50.78 149.77,-131.19 180.41,-227.01 -79.29,47.03 -167.1,81.17 -260.57,99.57 C 1609.3399,49.82 1502.6999,0 1384.6799,0 c -226.6,0 -410.328,183.71 -410.328,410.31 0,32.16 3.628,63.48 10.625,93.51 -341.016,-17.11 -643.368,-180.47 -845.739,-428.72 -35.324,60.6 -55.5583,131.09 -55.5583,206.29 0,142.36 72.4373,267.95 182.5433,341.53 -67.262,-2.13 -130.535,-20.59 -185.8519,-51.32 -0.039,1.71 -0.039,3.42 -0.039,5.16 0,198.803 141.441,364.635 329.145,402.342 -34.426,9.375 -70.676,14.395 -108.098,14.395 -26.441,0 -52.145,-2.578 -77.203,-7.364 52.215,163.008 203.75,281.649 383.304,284.946 -140.429,110.062 -317.351,175.66 -509.5972,175.66 -33.1211,0 -65.7851,-1.949 -97.8828,-5.738 181.586,116.4176 397.27,184.359 628.988,184.359 754.732,0 1167.462,-625.238 1167.462,-1167.47 0,-17.79 -0.41,-35.48 -1.2,-53.08 80.1799,-57.86 149.7399,-130.12 204.7499,-212.41")
    asvgv3.FillColor = 0xFF00ACED
    asvgv3.setViewportSize(2000,1625.36f)
    asvgv3.TraceResidueColor = 0x32000000
    asvgv3.TraceColor = Colors.Black
    asvgv3.rebuildGlyphData()
    asvgv3.start()


    'jRummyApps
    asvgv4.GlyphStrings = Array As String("M457.9,91.1c0-0.8,0-1.7,0-2.5c-0.1-5.9-0.8-11.9-2-17.7c-5.4-25-20.2-41.4-45.7-46.4c-10.3-2-21.2-2.4-31.8-2.4c-82.8-0.2-165.7-0.1-248.5,0c-7.6,0-15.4,0.1-22.9,1.3c-33,5-53.5,27.2-54,62.7c0,0.6,0,1.1,0,1.7c0,56.6,0,113.2,0,169.8h0v0.4c0,34.6,0,69.3,0.1,103.9c0,5.3,0.5,10.7,1.5,15.8c6.8,31.9,34.9,51.6,67.3,47.2c6.1-0.8,12.1-2.4,17.9-4.2c3.4-1.1,6.5-3.7,5.8-7.8c-0.8-4.3-4.7-3.8-8.1-3.9c-10.6-0.6-21.4-0.5-31.8-2.2c-18.1-3-30.1-13.6-33.8-32.1c-1.5-7.5-2.7-15.1-2.8-22.7c-0.1-31.3-0.1-62.7-0.1-94v-0.4c0-43.2,0-86.5,0-129.7c0-10.6,0.1-21.2,0.5-31.8c0.1-3.5,0.3-7.1,0.5-10.6c0.3-5.2,1.2-10.2,2.7-14.9c0.4-1.2,0.8-2.3,1.3-3.5c2.7-6.4,7-12.1,13.2-16.8c9.6-7.1,20.9-9.6,32.5-9.7c22.6-0.3,45.2-0.1,67.8-0.1c54.1,0,108.2-0.1,162.4,0.1c17.3,0,34.7-0.2,51.9,1.2c22.7,1.8,38.7,19.4,39,41.4c0.4,29,0.9,57.9,0.9,86.9c0,29.2-0.2,58.4-0.3,87.6v0.4c-0.2,33.2-0.4,66.4-0.5,99.6c0,2.5,0,5,0,7.5c-0.1,24.5-18.1,43.7-42.5,43.9c-48.5,0.4-97,0.2-145.5,0.1c-6.9,0-11.2-3.3-12-10.2c-0.7-6.9,0-13.9-0.1-20.8c-0.3-24-0.6-48-1-71.9c-0.1-4.1-0.5-8.3-1.4-12.4c-1.9-9.4-7-14.8-16.5-15.5c-13.9-1-27.9-1.1-41.9-1c-6.1,0-9.7,3.6-10.2,9.7c-0.6,7.4-0.1,14.9-0.2,22.3c-0.3,31-0.5,61.9-0.9,92.9c-0.1,9.6-3.1,18.6-9.7,25.7c-15.7,16.9-35.3,23.2-58,18.6c-12.4-2.5-23.3-8.7-33.9-15.4c-2.2-1.4-4.5-3.4-6.6,0.1c0.1,0.4,0.2,0.8,0.4,1c5.1,5.5,10.3,10.9,15.3,16.5c24.9,28.2,55.4,42.8,93.5,37.3c28.5-4.1,49.9-18.7,62-45.4c2.3-5.1,5.5-8.9,10.5-10.7c5.1-1.8,10.5-3.6,15.9-3.6c47.6-0.6,95.3-0.5,142.9-1.3c15.4-0.3,29.3-5.8,40.3-17.3c12.2-12.7,16.4-28.6,16.4-45.4c0.1-34.8,0.2-69.6,0.2-104.3C458.1,202.3,458,146.7,457.9,91.1z M292.2,246.5c-5.3,4.1-11.1,7.4-17.3,11.4h-0.6c-0.2,0.1-0.4,0.2-0.6,0.4c3.8,5,7.4,9.8,11.2,14.4c18.4,22.4,34.6,46,45.9,72.9c4.9,11.5,10.7,22.6,16,33.9c2.3,4.9,6.1,8.4,11.5,8.4c14,0,27.9-0.3,41.9-1.3c8.5-0.6,13.9-6,15.5-14.6c0.8-4.1,1.2-8.3,1.2-12.4c0-33.9,0-67.8,0-101.7v-0.4c0-55.5,0-111,0-166.6c0-4-0.4-8-1.1-11.9c-1.2-6.6-4.9-11.5-11.8-12.6c-6.4-1-12.8-1.9-19.3-1.9c-79.3-0.1-158.7-0.1-238,0c-10.3,0-20.6,0.5-30.9,1C106,65.9,100,71.1,99.1,80c-0.7,6.8-0.7,13.6-1.2,20.4c-0.3,4.1,1.6,5,5.3,5c36,0.2,72,0.2,107.9,1.2c16.9,0.5,34,1.9,50.5,5.2c28.7,5.7,48.1,22.6,54.9,52c2.6,11.1,2.7,22.4,1.3,33.7C315.6,217.1,308.2,234.1,292.2,246.5z M170,217.5c0.4,9.3,3.3,13.7,11.9,14.4c11.7,0.9,23.6,1.1,35.3,0.1c11.5-1,19.4-8.1,21.4-19.8c1.2-7,1.8-14.3,1.2-21.3c-1.3-16.1-8.8-24.2-23.9-27c-2.4-0.5-5-0.8-7.4-0.8c-10.8,0-21.6,0.1-32.4,0.4c-3.8,0.1-6.2,2.5-6.2,6.5c-0.1,9.8,0,19.5,0,29.3h0.1v17.5C170,216.8,170,217.1,170,217.5z")
    asvgv4.FillColor = 0xFF1D1D1D
    asvgv4.setViewportSize(512,512)
    asvgv4.TraceResidueColor = 0x32000000
    asvgv4.TraceColor = Colors.Black
    asvgv4.rebuildGlyphData()
    asvgv4.start()

    'BusyBox
    asvgv5.GlyphStrings = Array As String("M481,452.9c0,15.5-12.6,28.1-28.1,28.1H59.1C43.6,481,31,468.4,31,452.9V59.1C31,43.6,43.6,31,59.1,31h393.8c15.5,0,28.1,12.6,28.1,28.1V452.9z", _
              "M256.4,397.8l-0.1-0.1l-119.9-71.4v-115l0,0l120.4,64.2l0,0l0.1,0l0,0V398l0,0l-0.1-0.1L256.4,397.8z", _
              "M375.7,211.3l-118.8,64.3V398l118.8-71.9L375.7,211.3L375.7,211.3z", _
              "M375.7,211.3v84.2L312.3,328l-55.5-52.4v0L375.7,211.3L375.7,211.3z", _
              "M433.3,244.4L375.7,274l-64,32.9l-54.8-31.3v0l118.8-64.3l0,0L433.3,244.4z", _
              "M255.2,147l120.5,64.3l0,0l54.5-31.3l-54.5-30.7l-63-35.4L255.2,147L255.2,147L255.2,147L255.2,147z", _
              "M78.6,178.3l57.6-29.6l64-32.9l54.8,31.3v0l-118.8,64.3l0,0L78.6,178.3z", _
              "M255.1,147l1.8,128.7l-0.1,0l-120.5-64.3L255.1,147z", _
              "M256.9,275.7L256.9,275.7L255.1,147l0,0l0.1,0l120.5,64.3L256.9,275.7z", _
              "M256.9,275.7V350l-91-48.6l9.6-6.1l23.8,13.4L256.9,275.7L256.9,275.7z", _
              "M256.8,275.6L256.8,275.6l-0.1,122.3l0.2,0.1L256.8,275.6L256.8,275.6z", _
              "M256.8,275.6l-120.5-64.3l0,0l-54.5,31.3l54.5,30.7l63,35.4L256.8,275.6L256.8,275.6L256.8,275.6L256.8,275.6z")
    asvgv5.FillColors = Array As Int(0xFF41A4C4, 0xFFD95545, 0xFFC54C3F, 0xFFAA4438, 0xFFF4F3EE, 0xFFF4F3EE, 0xFFF4F3EE, 0xFFD2D1CC, 0xFFDCDAD6, 0xFFC54C3F, 0xFFD95545, 0xFFF4F3EE)
    asvgv5.setViewportSize(512,512)

    asvgv5.TraceResidueColor = 0x32000000
    asvgv5.TraceColor = Colors.Black
    asvgv5.rebuildGlyphData()
    asvgv5.start()

End Sub

Sub Activity_Resume

    t.Enabled = True

End Sub

Sub Activity_Pause (UserClosed As Boolean)

    t.Enabled = False

End Sub

Sub t_tick

    asvgv1.reset
    asvgv1.start

    asvgv2.reset
    asvgv2.start

    asvgv3.reset
    asvgv3.start

    asvgv4.reset
    asvgv4.start

    asvgv5.reset
    asvgv5.start          

End Sub

Sub asvgv1_trace_started

    Log("asvgv1 trace started")

End Sub

Sub asvgv1_state_finished

    Log("asvgv1 state finished")

End Sub

Library:

AnimatedSvgView
Author:
Github: Jared Rummler, Wrapped by: Johan Schoeman
Version: 1
  • AnimatedSvgView
    Events:
    • trace_started, state_finished
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • addListener
    • rebuildGlyphData
    • reset
    • setToFinishedFrame
    • setViewportSize (viewportWidth As Float, viewportHeight As Float)
    • start
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • FillColor As Int [write only]
    • FillColors() As Int [write only]
    • GlyphStrings() As String [write only]
    • Height As Int
    • Left As Int
    • Parent As Object [read only]
    • Tag As Object
    • Top As Int
    • TraceColor As Int [write only]
    • TraceColors() As Int [write only]
    • TraceResidueColor As Int [write only]
    • TraceResidueColors() As Int [write only]
    • Visible As Boolean
    • Width As Int
 

Attachments

  • b4aAnimatedSvgView.zip
    12.2 KB · Views: 600
  • AnimatedSvgViewLibFiles.zip
    23.7 KB · Views: 625
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
Code for RoadRunner:

RoadRunner.gif


B4X:
'RoadRunner
asvgv1.GlyphStrings = Array As String("M219.423,57.8498 C213.505,57.9958,208.745,60.4148,210.753,63.6298 " & _
    "C211.763,65.2478,211.328,65.6398,207.046,67.1798 " & _
    "C201.41,69.2068,193.743,74.7158,189.015,80.1218 " & _
    "C180.807,89.5078,186.538,102.901,198.282,101.766 " & _
    "C200.93,101.51,201.849,101.976,203.34,104.342 " & _
    "C205.014,107,205.518,107.216,209.529,106.667 " & _
    "C212.682,106.235,214.221,106.469,215.089,107.515 " & _
    "C216.064,108.69,215.636,109.584,212.733,112.321 " & _
    "C206.659,118.05,205.248,124.856,209.56,127.682 " & _
    "C213.226,130.084,216.756,128.748,221.968,123.001 " & _
    "C227.289,117.135,229.876,116.733,233.591,121.148 " & _
    "C236.236,124.291,236.673,126.555,235.601,131.734 " & _
    "C234.865,135.291,227.941,140.539,225.14,139.65 " & _
    "C223.963,139.276,222.47,139.838,221.182,141.126 " & _
    "C219.288,143.02,219.109,144.398,219.109,158.152 " & _
    "C219.109,173.115,219.133,173.128,216.722,173.733 " & _
    "C214.022,174.411,211.926,178.984,212.795,182.309 " & _
    "C213.094,183.452,212.979,184.382,212.575,184.382 " & _
    "C210.476,184.382,204.077,179.766,202.994,177.471 L201.769,174.832 " & _
    "L200.324,178.225 C196.633,187.007,196.733,197.35,200.544,202.131 " & _
    "C203.081,205.314,202.405,205.25,224.387,204.393 L234.188,203.985 " & _
    "L234.188,208.037 C234.189,215.161,232.186,228.398,230.041,235.398 " & _
    "C225.609,249.868,214.895,269.407,206.324,278.623 " & _
    "C202.703,282.517,201.895,282.905,197.403,282.927 " & _
    "C181.917,283.002,175.151,290.465,177.895,304.414 " & _
    "C179.59,313.029,187.822,326.21,199.57,339.157 " & _
    "C202.358,342.229,205.818,346.568,207.266,348.832 " & _
    "C208.714,351.097,213.102,356.403,217.004,360.612 " & _
    "C220.906,364.821,224.375,369.433,224.732,370.853 " & _
    "C225.146,372.504,223.691,379.846,220.711,391.209 " & _
    "C212.968,420.738,186.972,486.818,169.172,478.968 " & _
    "C22.3547,399.151,-3.26249,318.465,28.1421,182.941 " & _
    "C60.6767,101.613,117.515,62.2859,169.117,42.7142 " & _
    "C279.115,0.9938,374.134,45.9868,423.531,97.7008 " & _
    "C492.301,148.394,519.333,305.664,452.839,387.898 " & _
    "C413.054,468.708,302.666,489.888,278.587,491.048 " & _
    "C253.165,491.648,231.83,477.318,235.601,459.629 " & _
    "C238.164,451.094,242.959,431.503,247.758,410.059 " & _
    "C249.243,403.424,252.032,392.116,253.947,384.928 " & _
    "C257.749,370.65,259.138,362.31,257.685,362.31 " & _
    "C256.73,362.31,252.818,356.372,253.444,355.87 " & _
    "C253.636,355.716,256.504,355.088,259.821,354.456 " & _
    "C267.174,353.056,278.883,347.32,283.538,342.833 " & _
    "C286.566,339.915,287.83,339.426,294.219,338.843 " & _
    "C306.227,337.749,310.279,334.608,302.606,332.309 " & _
    "C294.773,329.962,296.207,328.223,313.758,319.053 " & _
    "C326.855,312.21,329.707,309.883,328.051,307.242 " & _
    "C327.465,306.307,326.003,305.377,324.815,305.2 " & _
    "C322.016,304.784,322.069,304.456,325.663,300.362 " & _
    "C329.167,296.371,329.538,292.656,326.637,290.624 " & _
    "C324.64,289.225,324.691,289.141,328.333,285.943 " & _
    "C333.68,281.248,340.602,272.978,342.877,268.571 " & _
    "C344.587,265.26,344.632,264.69,343.285,264.173 " & _
    "C342.438,263.848,340.614,263.889,339.233,264.236 " & _
    "C337.852,264.583,336.72,264.646,336.72,264.393 " & _
    "C336.72,264.14,338.583,261.785,340.867,259.147 " & _
    "C343.15,256.509,346.622,251.956,348.563,249.032 " & _
    "C349.862,247.075,353.479,241.446,355.882,237.817 " & _
    "C356.655,233.475,354.933,233.342,350.542,233.608 " & _
    "C349.298,234.114,346.923,235.457,345.265,236.592 " & _
    "C341.684,239.042,341.144,239.118,340.427,237.252 " & _
    "C340.093,236.382,341.297,234.866,343.568,233.294 " & _
    "C345.605,231.884,348.519,229.756,350.039,228.582 " & _
    "C351.624,224.178,359.541,215.613,350.887,219.566 " & _
    "C349.834,219.566,345.72,220.672,341.746,222.016 L334.521,224.466 " & _
    "L340.615,218.152 C343.953,214.675,346.957,210.686,347.306,209.293 " & _
    "C347.655,207.901,349.045,206.259,350.385,205.649 L352.804,204.55 " & _
    "L360.657,200.498 C363.87,198.785,368.846,195.342,371.715,192.833 " & _
    "C380.75,184.93,377.962,181.126,365.055,183.786 " & _
    "C360.252,184.776,358.835,184.787,358.835,183.849 " & _
    "C358.835,183.182,358.565,181.307,358.238,179.671 " & _
    "C357.657,176.767,357.886,176.561,367.316,171.88 " & _
    "C377.952,166.601,387.395,158.614,388.552,153.911 " & _
    "C389.624,149.553,387.698,146.418,383.432,145.618 " & _
    "C378.46,144.685,368.375,145.621,362.919,147.534 " & _
    "C360.453,148.399,358.241,148.95,358.018,148.728 L346.803,153.094 " & _
    "C330.172,159.323,313.759,171.344,310.112,179.953 " & _
    "C307.192,186.846,305.742,197.413,305.086,217.052 " & _
    "C304.085,247.006,302.535,261.521,298.049,282.895 " & _
    "C295.11,296.898,289.623,310.167,283.944,316.916 " & _
    "C282.477,318.66,280.722,320.102,280.08,320.089 " & _
    "C260.237,311.681,252.704,270.076,228.091,275.922 " & _
    "C227.022,276.494,226.143,276.693,226.143,276.362 " & _
    "C226.143,276.031,228.466,270.899,231.295,264.99 " & _
    "C234.124,259.082,238.612,248.592,241.253,241.681 " & _
    "C245.622,230.249,247.965,222.967,254.164,201.88 " & _
    "C256.186,195.001,256.49,194.637,262.08,191.168 " & _
    "C269.963,186.277,275.15,181.316,276.028,177.817 " & _
    "C277.06,173.703,272.97,166.751,266.761,162.047 " & _
    "C261.584,158.125,259.07,154.158,254.73,142.948 " & _
    "C253.247,139.118,250.983,135.275,249.515,134.121 L246.908,132.079 " & _
    "L251.243,118.288 C253.611,110.701,255.765,101.925,256.049,98.8118 " & _
    "C256.558,93.2358,254.799,82.8538,253.347,82.8538 " & _
    "C252.938,82.8538,252.053,84.0828,251.368,85.5868 L250.111,88.3508 " & _
    "L248.352,83.1358 C244.963,73.1248,235.536,62.1978,227.682,59.1988 " & _
    "C225.04,58.1898,222.11,57.7818,219.42,57.8478 Z")

asvgv1.FillColor = Colors.blue
asvgv1.setViewportSize(512,512)
asvgv1.TraceResidueColor = 0x32000000
asvgv1.TraceColor = Colors.Black
asvgv1.rebuildGlyphData()
asvgv1.start()
 

mshafiee110

Active Member
Licensed User
Longtime User
@Johan Schoeman

ezgif_838046131.gif


B4X:
asvgv4.GlyphStrings = Array As String(" M 429.34 10.57 C 435.22 9.16 441.06 11.07 446.96 11.12 C 447.03 12.39 447.04 13.66 446.97 14.92 C 424.63 11.33 399.17 16.14 383.60 33.63 C 378.23 39.00 373.74 47.97 377.69 55.30 C 381.65 62.53 389.86 66.69 397.92 67.26 C 411.33 69.53 424.81 66.12 437.71 62.69 C 448.91 44.06 465.31 28.38 484.99 18.97 C 491.00 15.91 498.85 12.98 505.02 16.95 C 507.91 18.23 508.29 22.29 507.99 24.94 C 504.21 34.23 496.13 40.67 487.94 45.96 C 475.32 53.99 461.51 60.13 447.16 64.30 C 435.68 80.37 425.20 98.30 408.02 109.02 C 393.60 118.57 376.22 122.85 359.07 122.85 C 354.32 121.41 348.87 121.61 345.02 117.98 C 338.53 114.08 337.72 102.60 344.96 98.95 C 348.75 96.53 353.53 97.64 355.80 101.27 C 357.91 105.02 354.67 106.75 352.72 108.80 C 348.69 111.69 347.18 107.17 343.97 106.92 C 343.61 113.14 349.10 117.48 354.89 118.23 C 375.94 121.85 397.53 112.06 411.79 96.79 C 420.18 87.43 428.76 77.86 435.09 66.99 C 425.34 70.13 415.13 71.02 405.00 71.99 C 394.56 71.00 382.26 69.47 375.95 60.04 C 369.87 52.17 371.49 40.71 377.03 33.03 C 388.99 16.88 410.01 10.66 429.34 10.57 M 495.16 19.21 C 474.54 24.49 462.21 42.93 449.30 58.28 C 449.21 58.72 449.04 59.60 448.95 60.04 C 465.09 55.73 479.56 46.68 493.02 37.03 C 497.88 33.50 502.04 28.76 503.96 22.99 C 503.31 19.13 498.45 17.98 495.16 19.21 Z", _
" M 158.32 11.43 C 163.16 11.06 168.07 12.27 172.96 12.08 C 174.96 11.99 175.22 14.30 174.95 15.81 C 162.49 17.62 150.69 22.51 139.97 29.00 C 127.36 37.97 117.15 49.80 108.57 62.62 C 107.46 64.23 106.23 65.87 105.88 67.85 C 118.16 66.27 127.36 56.99 135.10 48.09 C 137.40 45.75 137.64 39.89 142.03 40.98 C 139.98 51.97 129.98 60.12 121.23 66.25 C 116.25 70.04 109.87 70.30 104.17 72.19 C 91.71 88.78 80.78 106.55 66.91 122.04 C 78.66 118.81 88.74 111.60 98.33 104.34 C 99.52 103.16 101.80 105.43 100.71 106.66 C 90.95 115.02 79.68 121.98 67.16 125.30 C 61.96 127.33 58.59 131.95 54.83 135.82 C 47.63 145.25 38.11 152.57 28.72 159.70 C 24.34 162.44 18.58 166.38 13.30 163.65 C 9.23 162.07 7.61 156.38 9.65 152.67 C 14.89 142.35 26.28 137.98 36.00 133.02 C 42.11 129.86 48.94 128.36 54.88 124.90 C 68.62 107.24 81.79 89.14 95.00 71.09 C 89.95 69.27 84.73 66.65 82.66 61.33 C 77.54 48.73 88.72 37.89 97.28 30.30 C 115.17 17.98 136.84 12.40 158.32 11.43 M 154.34 15.45 C 144.35 15.96 134.56 18.16 125.02 21.11 C 109.36 27.17 92.76 35.98 86.54 52.66 C 83.54 59.12 89.83 67.92 96.81 66.87 C 102.51 58.11 108.96 49.79 116.75 42.75 C 125.32 33.27 135.86 25.51 147.67 20.59 C 151.37 18.57 156.68 18.64 159.14 15.09 L 154.34 15.45 M 48.31 131.40 C 36.85 136.10 25.09 141.31 16.22 150.20 C 15.11 152.37 13.06 154.40 13.01 156.95 C 13.95 160.63 19.17 161.22 21.96 158.95 C 33.19 153.61 38.90 141.94 48.26 134.29 C 50.12 133.95 51.00 129.48 48.31 131.40 Z", _
" M 228.34 33.41 C 233.46 31.27 241.34 33.95 239.01 40.97 C 230.19 56.82 213.24 65.43 197.94 73.91 C 185.52 77.90 175.01 86.14 168.08 97.16 C 174.40 93.63 180.42 88.48 187.95 88.01 C 191.12 89.18 195.11 91.67 193.03 96.03 C 192.57 103.44 185.34 107.71 180.65 112.60 C 178.77 114.62 174.66 115.75 174.97 119.03 C 181.07 118.59 186.30 114.62 191.02 111.02 C 193.61 108.59 197.27 107.33 198.99 103.99 C 202.13 98.91 208.12 97.12 212.79 93.81 C 218.65 90.71 225.21 88.38 231.96 89.04 C 234.02 89.39 235.17 91.16 236.18 92.81 C 239.11 92.25 238.40 84.98 244.00 88.98 C 245.51 88.99 248.01 88.44 246.80 90.80 C 242.70 95.05 237.95 98.75 234.65 103.70 C 230.52 108.50 224.48 112.51 222.93 118.99 C 224.38 118.94 226.08 119.34 227.33 118.35 C 241.42 109.29 253.06 96.66 268.06 89.01 C 269.75 89.04 273.14 89.08 274.84 89.10 C 277.34 91.54 276.73 94.97 276.29 98.13 C 282.77 95.05 287.92 87.94 296.02 88.99 C 301.38 88.86 302.61 96.30 299.96 99.96 C 296.82 106.67 290.09 110.04 285.22 115.21 C 284.13 116.30 282.75 117.31 282.96 119.05 C 292.80 117.09 299.67 109.22 307.89 104.11 C 311.12 106.88 305.76 109.26 304.19 111.19 C 297.65 116.00 290.73 122.58 282.04 121.98 C 277.69 121.26 276.65 115.25 278.97 111.96 C 282.58 104.54 290.41 100.72 295.76 94.75 C 295.84 94.32 296.01 93.46 296.09 93.03 C 290.75 92.14 286.51 95.79 282.31 98.33 C 273.15 105.80 264.01 113.34 255.77 121.82 C 253.31 121.86 248.39 121.95 245.93 121.99 C 254.24 112.31 262.73 102.79 271.75 93.75 C 273.16 91.23 270.01 91.83 268.67 92.63 C 255.55 99.18 245.01 109.57 233.65 118.61 C 230.20 120.62 226.52 124.20 222.27 122.70 C 218.46 121.78 219.15 116.96 218.89 113.98 C 212.57 117.28 207.20 123.91 199.30 122.71 C 195.05 121.66 194.71 116.57 194.89 112.98 C 188.71 116.37 183.30 121.96 176.07 122.87 C 170.76 122.73 168.52 116.92 170.27 112.26 C 174.66 105.13 181.87 100.46 187.81 94.78 C 188.80 92.30 187.43 91.36 185.04 92.06 C 170.23 98.95 158.23 110.46 146.72 121.79 C 144.28 121.84 139.41 121.96 136.97 122.02 C 143.74 112.23 153.19 104.66 160.07 94.94 C 152.77 97.77 147.60 104.78 140.96 108.94 C 138.57 111.14 135.07 109.47 132.24 109.23 C 126.81 114.73 120.40 119.48 113.09 122.16 C 108.23 124.80 100.83 119.99 102.98 113.99 C 102.67 106.50 109.17 100.93 114.34 96.37 C 121.63 91.94 129.84 86.97 138.75 88.22 C 140.67 90.26 143.96 91.97 141.66 95.68 C 140.08 99.55 137.72 102.96 134.85 105.95 C 140.98 106.99 145.06 101.66 149.70 98.66 C 155.93 92.08 163.60 87.14 170.96 81.95 C 182.30 72.99 190.50 60.87 201.36 51.39 C 209.51 44.33 218.19 37.34 228.34 33.41 M 229.32 37.34 C 218.62 41.88 210.77 50.69 202.76 58.76 C 198.01 63.72 192.48 68.09 188.97 74.08 C 205.96 65.63 224.37 56.42 234.71 39.74 C 236.44 36.12 232.29 36.19 229.32 37.34 M 132.35 92.34 C 124.19 97.31 117.97 104.56 111.31 111.27 C 109.64 113.59 107.19 115.84 107.99 119.01 C 109.46 119.04 110.99 119.09 112.35 118.44 C 123.55 114.35 132.53 105.41 137.95 94.96 C 139.01 91.25 135.97 90.98 132.35 92.34 M 229.23 92.43 C 220.08 95.07 212.91 101.78 206.20 108.19 C 204.00 111.59 199.69 114.49 199.95 118.99 C 204.40 120.23 207.51 116.81 210.93 114.91 C 218.30 109.44 226.40 104.15 231.05 96.02 C 232.75 94.20 231.65 92.10 229.23 92.43 Z", _
" M 552.33 33.39 C 556.75 31.55 564.58 33.32 562.02 40.02 C 558.75 50.13 548.66 56.26 540.62 62.58 C 530.92 68.94 520.77 74.66 510.02 79.06 C 501.97 81.78 498.18 89.82 492.28 95.28 C 492.19 95.72 492.01 96.59 491.92 97.02 C 497.29 93.46 502.85 89.94 509.07 88.09 C 513.02 87.53 518.08 91.50 516.04 96.01 C 516.75 100.37 513.05 103.55 510.81 106.79 C 506.80 109.38 503.82 113.21 499.84 115.84 C 498.77 116.56 498.58 118.00 497.99 119.07 C 507.30 117.62 514.86 110.73 521.74 104.76 C 527.93 95.68 538.52 90.37 549.03 88.01 C 551.95 87.10 554.73 88.52 556.93 90.18 C 558.67 96.43 553.97 101.20 550.96 106.02 C 555.97 106.91 558.97 102.18 562.30 99.31 C 568.19 95.66 574.08 91.42 580.98 89.96 C 583.50 88.33 586.44 88.78 588.72 90.29 C 590.67 92.61 589.38 95.71 587.85 97.87 C 581.73 102.97 574.15 106.18 566.31 107.38 C 561.85 109.35 558.79 113.42 557.09 117.89 C 558.39 118.59 559.72 120.06 561.32 119.49 C 579.51 116.24 590.87 100.05 606.01 91.02 C 609.47 89.16 615.19 85.58 618.30 89.70 C 621.11 91.55 620.05 95.40 619.21 98.17 C 625.76 94.83 631.52 89.30 639.00 87.99 C 643.54 88.23 647.92 92.54 645.20 97.17 C 651.84 93.87 657.90 88.01 665.95 89.02 C 668.71 90.11 672.56 91.67 670.04 96.03 C 669.12 105.53 658.89 109.76 653.21 116.17 C 650.30 117.56 653.51 119.45 654.93 118.92 C 665.09 115.57 672.89 107.72 680.25 100.27 C 689.18 94.10 699.39 87.63 710.79 89.11 C 712.05 90.26 712.60 92.07 714.00 93.04 C 715.57 92.64 715.41 90.33 716.29 89.16 C 719.13 89.02 722.19 88.90 725.09 89.05 C 718.23 97.81 709.99 105.42 703.00 114.00 C 702.47 115.25 701.43 117.73 700.91 118.98 C 702.91 119.29 704.92 118.92 706.37 117.40 C 720.12 108.64 731.07 95.78 746.07 89.03 C 752.20 86.25 756.41 93.19 753.94 98.05 C 761.02 94.59 766.94 86.66 775.75 89.22 C 780.86 92.15 778.70 98.94 775.77 102.78 C 771.38 107.07 767.23 111.62 762.45 115.46 C 761.67 116.48 761.01 117.59 760.88 118.88 C 770.24 116.93 777.11 109.93 784.66 104.63 C 786.16 102.91 788.00 106.44 786.31 107.31 C 777.89 113.38 769.65 123.76 758.23 121.80 C 755.12 119.97 755.84 116.21 756.05 113.08 C 758.86 105.18 766.66 100.97 772.70 95.71 C 773.78 93.57 776.49 89.61 769.07 93.04 C 760.20 96.88 753.44 104.06 746.06 110.05 C 741.45 113.41 737.86 117.91 733.72 121.79 L 728.99 121.99 C 719.90 125.39 725.25 120.39 726.25 118.23 C 734.50 109.77 742.77 101.27 750.09 91.97 C 740.78 93.42 733.68 100.98 726.18 106.18 C 718.65 111.48 712.73 119.84 703.67 122.60 C 698.10 125.47 694.89 117.90 696.80 113.84 C 691.35 115.96 687.64 121.53 681.66 122.61 C 674.64 125.94 672.79 117.76 671.77 113.02 C 666.36 117.26 660.54 123.13 652.99 122.05 C 649.03 122.89 646.72 117.91 647.53 114.68 C 649.44 106.23 657.48 101.83 663.73 96.72 C 664.91 94.53 667.22 89.44 660.34 93.38 C 647.48 98.15 639.16 109.53 628.74 117.74 C 626.32 119.81 626.05 124.87 620.99 122.00 L 615.83 121.93 C 620.72 113.79 628.54 107.83 634.29 100.27 C 636.46 97.75 639.80 95.64 640.07 92.01 C 638.58 92.00 636.98 91.77 635.67 92.63 C 621.48 99.69 610.63 111.63 598.70 121.75 C 596.23 121.79 591.30 121.88 588.83 121.93 C 594.30 111.53 604.94 105.21 612.03 96.03 C 612.87 94.76 614.03 93.60 614.07 91.98 C 612.85 91.85 611.71 92.06 610.65 92.61 C 595.16 100.61 584.56 116.17 567.70 121.65 C 563.74 122.99 558.99 124.11 555.27 121.72 C 551.91 118.92 553.48 114.06 552.86 110.21 C 550.96 109.91 549.11 109.40 547.22 109.16 C 541.55 115.46 534.36 121.02 525.93 122.84 C 520.84 123.10 516.81 118.22 517.90 113.08 C 511.88 116.73 506.15 121.70 499.05 122.99 C 495.45 122.02 491.96 118.17 493.32 114.29 C 495.59 105.24 505.37 101.58 510.78 94.76 C 510.84 94.06 510.96 92.66 511.03 91.96 C 503.92 92.48 498.25 97.78 492.64 101.61 C 484.76 106.96 478.66 114.34 471.28 120.27 C 468.79 123.93 463.35 120.87 459.93 122.00 C 465.82 114.88 472.18 108.21 478.25 101.26 C 479.59 99.53 482.21 98.44 482.04 95.94 C 480.93 96.01 479.97 96.42 479.18 97.18 C 468.79 104.80 459.68 114.29 447.98 120.01 C 444.02 122.07 439.04 124.27 434.65 122.42 C 429.52 120.44 431.12 113.49 431.29 109.31 C 435.81 99.76 445.46 94.00 454.70 89.68 C 458.41 87.45 462.40 87.99 465.69 90.33 C 469.06 94.91 464.15 101.63 459.06 102.00 C 456.09 100.90 454.25 97.90 455.94 94.88 C 449.62 100.88 442.93 106.68 437.81 113.80 C 436.60 115.27 435.72 117.04 435.96 119.00 C 441.08 119.96 445.61 117.10 449.97 114.96 C 457.47 110.25 464.48 104.79 471.71 99.68 C 479.11 91.86 488.40 86.23 497.25 80.25 C 507.05 68.48 518.60 58.27 529.26 47.27 C 536.16 41.54 543.69 36.11 552.33 33.39 M 552.32 37.34 C 535.86 45.69 524.17 60.75 511.90 74.04 C 515.22 73.49 517.93 71.26 520.92 69.86 C 534.37 62.30 548.13 54.07 557.25 41.26 C 559.59 38.07 556.98 34.23 552.32 37.34 M 548.32 92.34 C 540.54 95.62 535.20 102.56 529.22 108.22 C 527.08 111.08 524.26 113.58 523.01 117.00 C 523.36 119.87 527.22 119.27 528.99 118.04 C 538.38 114.14 545.73 106.76 551.64 98.67 C 553.71 95.92 555.04 88.17 548.32 92.34 M 583.27 93.32 C 579.37 95.83 573.43 97.61 571.95 102.05 C 576.87 100.75 584.09 98.38 585.03 92.94 C 584.59 93.03 583.71 93.22 583.27 93.32 M 703.31 93.33 C 693.95 98.39 685.69 105.78 679.17 114.17 C 677.20 116.10 677.26 120.53 680.95 118.94 C 690.91 114.69 699.07 107.22 706.77 99.78 C 709.92 96.91 710.55 89.27 703.31 93.33 Z")
asvgv4.FillColors = Array As Int( 0xFF060606  ,0xFF060606,0xFF060606,0xFF060606) 
asvgv4.setViewportSize(1512,512)
asvgv4.TraceResidueColor = 0x32000000
asvgv4.TraceColor = Colors.Black
asvgv4.rebuildGlyphData()
asvgv4.start()
 

Mashiane

Expert
Licensed User
Longtime User
It wraps this Github project. Posting the following:
1. B4A project for demonstration purposes
2. B4A library files - copy them to your additional library folder

I have added Google, Twitter, Github, jRummyApps,and BusyBox - create/download your own and add it to the B4A code.

View attachment 45183

Sample Code:

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

'#AdditionalRes: ..\resource
'#AdditionalRes: C:\Users\----------2\Documents\Basic 4 Android\JOHAN APPS\JHS LIBS\resource\b4a_appcompat, de.amberhome.objects.appcompat
'#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
'#Extends: android.support.v7.app.AppCompatActivity

#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.
     Dim t As Timer

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 asvgv1 As AnimatedSvgView
    Private asvgv2 As AnimatedSvgView
    Private asvgv3 As AnimatedSvgView
    Private asvgv4 As AnimatedSvgView
    Private asvgv5 As AnimatedSvgView

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")
    t.Initialize("t",5000)

    'Google
    asvgv1.GlyphStrings = Array As String("M142.9,24.2c40.2-13.9,85.3-13.6,125.3,1.1c22.2,8.2,42.5,21,59.9,37.1c-5.8,6.3-12.1,12.2-18.1,18.3 c-11.4,11.4-22.8,22.8-34.2,34.2c-11.3-10.8-25.1-19-40.1-23.6c-17.6-5.3-36.6-6.1-54.6-2.2c-21,4.5-40.5,15.5-55.6,30.9 c-12.2,12.3-21.4,27.5-27,43.9c-20.3-15.8-40.6-31.5-61-47.3C59,73.6,97.6,39.7,142.9,24.2z", _
                                          "M21.4,163.2c3.3-16.2,8.7-32,16.2-46.8c20.3,15.8,40.6,31.5,61,47.3c-8,23.3-8,49.2,0,72.4 c-20.3,15.8-40.6,31.6-60.9,47.3C18.9,246.7,13.2,203.6,21.4,163.2z", _
                                          "M203.7,165.1c58.3,0,116.7,0,175,0c5.8,32.7,4.5,66.8-4.7,98.8c-8.5,29.3-24.6,56.5-47.1,77.2 c-19.7-15.3-39.4-30.6-59.1-45.9c19.5-13.1,33.3-34.3,37.2-57.5c-33.8,0-67.6,0-101.4,0C203.7,213.5,203.7,189.3,203.7,165.1z", _
                                          "M37.5,283.5c20.3-15.7,40.6-31.5,60.9-47.3c7.8,22.9,22.8,43.2,42.6,57.1c12.4,8.7,26.6,14.9,41.4,17.9 c14.6,3,29.7,2.6,44.4,0.1c14.6-2.6,28.7-7.9,41-16.2c19.7,15.3,39.4,30.6,59.1,45.9c-21.3,19.7-48,33.1-76.2,39.6 c-31.2,7.1-64.2,7.3-95.2-1c-24.6-6.5-47.7-18.2-67.6-34.1C67,328.9,49.6,307.5,37.5,283.5z")

    asvgv1.FillColors = Array As Int(0xFFEA4335, 0xFFFBBC05, 0xFF4285F4, 0xFF34A853)
    asvgv1.setViewportSize(400,400)


    asvgv1.TraceResidueColor = 0x32000000
    asvgv1.TraceColor = Colors.Black
    asvgv1.rebuildGlyphData()
    asvgv1.start()
 

    'Github
    asvgv2.GlyphStrings = Array As String("M256 70.7c-102.6 0-185.9 83.2-185.9 185.9 0 82.1 53.3 151.8 127.1 176.4 9.3 1.7 12.3-4 12.3-8.9V389.4c-51.7 11.3-62.5-21.9-62.5-21.9 -8.4-21.5-20.6-27.2-20.6-27.2 -16.9-11.5 1.3-11.3 1.3-11.3 18.7 1.3 28.5 19.2 28.5 19.2 16.6 28.4 43.5 20.2 54.1 15.4 1.7-12 6.5-20.2 11.8-24.9 -41.3-4.7-84.7-20.6-84.7-91.9 0-20.3 7.3-36.9 19.2-49.9 -1.9-4.7-8.3-23.6 1.8-49.2 0 0 15.6-5 51.1 19.1 14.8-4.1 30.7-6.2 46.5-6.3 15.8 0.1 31.7 2.1 46.6 6.3 35.5-24 51.1-19.1 51.1-19.1 10.1 25.6 3.8 44.5 1.8 49.2 11.9 13 19.1 29.6 19.1 49.9 0 71.4-43.5 87.1-84.9 91.7 6.7 5.8 12.8 17.1 12.8 34.4 0 24.9 0 44.9 0 51 0 4.9 3 10.7 12.4 8.9 73.8-24.6 127-94.3 127-176.4C441.9 153.9 358.6 70.7 256 70.7z")
    asvgv2.FillColor = Colors.Black
    asvgv2.setViewportSize(512,512)
    asvgv2.TraceResidueColor = 0x32000000
    asvgv2.TraceColor = Colors.Black
    asvgv2.rebuildGlyphData()
    asvgv2.start()

 
    'Twitter
    asvgv3.GlyphStrings = Array As String("m 1999.9999,192.4 c -73.58,32.64 -152.67,54.69 -235.66,64.61 84.7,-50.78 149.77,-131.19 180.41,-227.01 -79.29,47.03 -167.1,81.17 -260.57,99.57 C 1609.3399,49.82 1502.6999,0 1384.6799,0 c -226.6,0 -410.328,183.71 -410.328,410.31 0,32.16 3.628,63.48 10.625,93.51 -341.016,-17.11 -643.368,-180.47 -845.739,-428.72 -35.324,60.6 -55.5583,131.09 -55.5583,206.29 0,142.36 72.4373,267.95 182.5433,341.53 -67.262,-2.13 -130.535,-20.59 -185.8519,-51.32 -0.039,1.71 -0.039,3.42 -0.039,5.16 0,198.803 141.441,364.635 329.145,402.342 -34.426,9.375 -70.676,14.395 -108.098,14.395 -26.441,0 -52.145,-2.578 -77.203,-7.364 52.215,163.008 203.75,281.649 383.304,284.946 -140.429,110.062 -317.351,175.66 -509.5972,175.66 -33.1211,0 -65.7851,-1.949 -97.8828,-5.738 181.586,116.4176 397.27,184.359 628.988,184.359 754.732,0 1167.462,-625.238 1167.462,-1167.47 0,-17.79 -0.41,-35.48 -1.2,-53.08 80.1799,-57.86 149.7399,-130.12 204.7499,-212.41")
    asvgv3.FillColor = 0xFF00ACED
    asvgv3.setViewportSize(2000,1625.36f)
    asvgv3.TraceResidueColor = 0x32000000
    asvgv3.TraceColor = Colors.Black
    asvgv3.rebuildGlyphData()
    asvgv3.start()


    'jRummyApps
    asvgv4.GlyphStrings = Array As String("M457.9,91.1c0-0.8,0-1.7,0-2.5c-0.1-5.9-0.8-11.9-2-17.7c-5.4-25-20.2-41.4-45.7-46.4c-10.3-2-21.2-2.4-31.8-2.4c-82.8-0.2-165.7-0.1-248.5,0c-7.6,0-15.4,0.1-22.9,1.3c-33,5-53.5,27.2-54,62.7c0,0.6,0,1.1,0,1.7c0,56.6,0,113.2,0,169.8h0v0.4c0,34.6,0,69.3,0.1,103.9c0,5.3,0.5,10.7,1.5,15.8c6.8,31.9,34.9,51.6,67.3,47.2c6.1-0.8,12.1-2.4,17.9-4.2c3.4-1.1,6.5-3.7,5.8-7.8c-0.8-4.3-4.7-3.8-8.1-3.9c-10.6-0.6-21.4-0.5-31.8-2.2c-18.1-3-30.1-13.6-33.8-32.1c-1.5-7.5-2.7-15.1-2.8-22.7c-0.1-31.3-0.1-62.7-0.1-94v-0.4c0-43.2,0-86.5,0-129.7c0-10.6,0.1-21.2,0.5-31.8c0.1-3.5,0.3-7.1,0.5-10.6c0.3-5.2,1.2-10.2,2.7-14.9c0.4-1.2,0.8-2.3,1.3-3.5c2.7-6.4,7-12.1,13.2-16.8c9.6-7.1,20.9-9.6,32.5-9.7c22.6-0.3,45.2-0.1,67.8-0.1c54.1,0,108.2-0.1,162.4,0.1c17.3,0,34.7-0.2,51.9,1.2c22.7,1.8,38.7,19.4,39,41.4c0.4,29,0.9,57.9,0.9,86.9c0,29.2-0.2,58.4-0.3,87.6v0.4c-0.2,33.2-0.4,66.4-0.5,99.6c0,2.5,0,5,0,7.5c-0.1,24.5-18.1,43.7-42.5,43.9c-48.5,0.4-97,0.2-145.5,0.1c-6.9,0-11.2-3.3-12-10.2c-0.7-6.9,0-13.9-0.1-20.8c-0.3-24-0.6-48-1-71.9c-0.1-4.1-0.5-8.3-1.4-12.4c-1.9-9.4-7-14.8-16.5-15.5c-13.9-1-27.9-1.1-41.9-1c-6.1,0-9.7,3.6-10.2,9.7c-0.6,7.4-0.1,14.9-0.2,22.3c-0.3,31-0.5,61.9-0.9,92.9c-0.1,9.6-3.1,18.6-9.7,25.7c-15.7,16.9-35.3,23.2-58,18.6c-12.4-2.5-23.3-8.7-33.9-15.4c-2.2-1.4-4.5-3.4-6.6,0.1c0.1,0.4,0.2,0.8,0.4,1c5.1,5.5,10.3,10.9,15.3,16.5c24.9,28.2,55.4,42.8,93.5,37.3c28.5-4.1,49.9-18.7,62-45.4c2.3-5.1,5.5-8.9,10.5-10.7c5.1-1.8,10.5-3.6,15.9-3.6c47.6-0.6,95.3-0.5,142.9-1.3c15.4-0.3,29.3-5.8,40.3-17.3c12.2-12.7,16.4-28.6,16.4-45.4c0.1-34.8,0.2-69.6,0.2-104.3C458.1,202.3,458,146.7,457.9,91.1z M292.2,246.5c-5.3,4.1-11.1,7.4-17.3,11.4h-0.6c-0.2,0.1-0.4,0.2-0.6,0.4c3.8,5,7.4,9.8,11.2,14.4c18.4,22.4,34.6,46,45.9,72.9c4.9,11.5,10.7,22.6,16,33.9c2.3,4.9,6.1,8.4,11.5,8.4c14,0,27.9-0.3,41.9-1.3c8.5-0.6,13.9-6,15.5-14.6c0.8-4.1,1.2-8.3,1.2-12.4c0-33.9,0-67.8,0-101.7v-0.4c0-55.5,0-111,0-166.6c0-4-0.4-8-1.1-11.9c-1.2-6.6-4.9-11.5-11.8-12.6c-6.4-1-12.8-1.9-19.3-1.9c-79.3-0.1-158.7-0.1-238,0c-10.3,0-20.6,0.5-30.9,1C106,65.9,100,71.1,99.1,80c-0.7,6.8-0.7,13.6-1.2,20.4c-0.3,4.1,1.6,5,5.3,5c36,0.2,72,0.2,107.9,1.2c16.9,0.5,34,1.9,50.5,5.2c28.7,5.7,48.1,22.6,54.9,52c2.6,11.1,2.7,22.4,1.3,33.7C315.6,217.1,308.2,234.1,292.2,246.5z M170,217.5c0.4,9.3,3.3,13.7,11.9,14.4c11.7,0.9,23.6,1.1,35.3,0.1c11.5-1,19.4-8.1,21.4-19.8c1.2-7,1.8-14.3,1.2-21.3c-1.3-16.1-8.8-24.2-23.9-27c-2.4-0.5-5-0.8-7.4-0.8c-10.8,0-21.6,0.1-32.4,0.4c-3.8,0.1-6.2,2.5-6.2,6.5c-0.1,9.8,0,19.5,0,29.3h0.1v17.5C170,216.8,170,217.1,170,217.5z")
    asvgv4.FillColor = 0xFF1D1D1D
    asvgv4.setViewportSize(512,512)
    asvgv4.TraceResidueColor = 0x32000000
    asvgv4.TraceColor = Colors.Black
    asvgv4.rebuildGlyphData()
    asvgv4.start()

    'BusyBox
    asvgv5.GlyphStrings = Array As String("M481,452.9c0,15.5-12.6,28.1-28.1,28.1H59.1C43.6,481,31,468.4,31,452.9V59.1C31,43.6,43.6,31,59.1,31h393.8c15.5,0,28.1,12.6,28.1,28.1V452.9z", _
              "M256.4,397.8l-0.1-0.1l-119.9-71.4v-115l0,0l120.4,64.2l0,0l0.1,0l0,0V398l0,0l-0.1-0.1L256.4,397.8z", _
              "M375.7,211.3l-118.8,64.3V398l118.8-71.9L375.7,211.3L375.7,211.3z", _
              "M375.7,211.3v84.2L312.3,328l-55.5-52.4v0L375.7,211.3L375.7,211.3z", _
              "M433.3,244.4L375.7,274l-64,32.9l-54.8-31.3v0l118.8-64.3l0,0L433.3,244.4z", _
              "M255.2,147l120.5,64.3l0,0l54.5-31.3l-54.5-30.7l-63-35.4L255.2,147L255.2,147L255.2,147L255.2,147z", _
              "M78.6,178.3l57.6-29.6l64-32.9l54.8,31.3v0l-118.8,64.3l0,0L78.6,178.3z", _
              "M255.1,147l1.8,128.7l-0.1,0l-120.5-64.3L255.1,147z", _
              "M256.9,275.7L256.9,275.7L255.1,147l0,0l0.1,0l120.5,64.3L256.9,275.7z", _
              "M256.9,275.7V350l-91-48.6l9.6-6.1l23.8,13.4L256.9,275.7L256.9,275.7z", _
              "M256.8,275.6L256.8,275.6l-0.1,122.3l0.2,0.1L256.8,275.6L256.8,275.6z", _
              "M256.8,275.6l-120.5-64.3l0,0l-54.5,31.3l54.5,30.7l63,35.4L256.8,275.6L256.8,275.6L256.8,275.6L256.8,275.6z")
    asvgv5.FillColors = Array As Int(0xFF41A4C4, 0xFFD95545, 0xFFC54C3F, 0xFFAA4438, 0xFFF4F3EE, 0xFFF4F3EE, 0xFFF4F3EE, 0xFFD2D1CC, 0xFFDCDAD6, 0xFFC54C3F, 0xFFD95545, 0xFFF4F3EE)
    asvgv5.setViewportSize(512,512)

    asvgv5.TraceResidueColor = 0x32000000
    asvgv5.TraceColor = Colors.Black
    asvgv5.rebuildGlyphData()
    asvgv5.start()

End Sub

Sub Activity_Resume

    t.Enabled = True

End Sub

Sub Activity_Pause (UserClosed As Boolean)

    t.Enabled = False

End Sub

Sub t_tick

    asvgv1.reset
    asvgv1.start

    asvgv2.reset
    asvgv2.start

    asvgv3.reset
    asvgv3.start

    asvgv4.reset
    asvgv4.start

    asvgv5.reset
    asvgv5.start         

End Sub

Sub asvgv1_trace_started

    Log("asvgv1 trace started")

End Sub

Sub asvgv1_state_finished

    Log("asvgv1 state finished")

End Sub

Library:

AnimatedSvgView
Author:
Github: Jared Rummler, Wrapped by: Johan Schoeman
Version: 1
  • AnimatedSvgView
    Events:
    • trace_started, state_finished
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • addListener
    • rebuildGlyphData
    • reset
    • setToFinishedFrame
    • setViewportSize (viewportWidth As Float, viewportHeight As Float)
    • start
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • FillColor As Int [write only]
    • FillColors() As Int [write only]
    • GlyphStrings() As String [write only]
    • Height As Int
    • Left As Int
    • Parent As Object [read only]
    • Tag As Object
    • Top As Int
    • TraceColor As Int [write only]
    • TraceColors() As Int [write only]
    • TraceResidueColor As Int [write only]
    • TraceResidueColors() As Int [write only]
    • Visible As Boolean
    • Width As Int
Wow..
 
Top