Android Question [Solved] How I can create icons to B4XLoadingIndicator?

asales

Expert
Licensed User
Longtime User
Is possible to create a image of heart ❤ to use it in the B4XLoadingIndicator, instead the circles?
If yes, how I can make it?
Thanks in advance for any tip.
 

asales

Expert
Licensed User
Longtime User
Thanks for the tips.
I changed the sub Draw_ThreeCircles1 to use FontAwesome and worked.

B4X:
Private Sub Draw_Hearts (Progress As Float)
    Dim MaxR As Float = (cvs.TargetRect.Width / 2 - 30dip) / 2
    Dim r As Float = 15dip + MaxR + MaxR * Sin(Progress * 2 * cPI)
    For i = 0 To 2
        Dim alpha As Int = i * 120 + Progress * 360
       
        Dim fnt As B4XFont = xui.CreateFont(Typeface.FONTAWESOME, 18)
        cvs.DrawText(Chr(0xF004), cvs.TargetRect.CenterX + r * SinD(alpha), cvs.TargetRect.CenterY + r * CosD(alpha), fnt, clr, "CENTER")
    Next
End Sub

[Update] This is the result:

b4xloading2.jpg
 
Last edited:
Upvote 0

PoliceFreez

Member
Licensed User
Longtime User
Hi. Noob question but when I put a load indicator on my project it just keeps running.

How do I use it if I want a load indicator come on when pressing the back button on one page to the main page?
 
Upvote 0
Top