B4J Library [B4X] [XUI] [B4xLib] SD LoadingIndicator

This library is an update of this source based on @Erel's code (here)
New indicators in the shape of Heart, Infinity, Bubble have been added and some bugs have been fixed.

NOTE: You can use this library for personal and commercial use. Include it in your projects. Attention, even if it is a B4XLib library, it is not allowed to decompress it, modify it, change its name or redistribute it without the permission. If you want to study the code, a part of it can be found in the links above. Those are public and you can use them.

SD_LoadingIndicator

Author:
Star-Dust
Version: 0.04
  • SD_LoadingIndicator
    • Functions:
      • BringToFront
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • Hide
      • Initialize (Callback As Object, EventName As String)
      • RemoveViewFromParent
      • RequestFocus
      • SendToBack
      • Show
      • Snapshot As B4XView
    • Properties:
      • Height As Int
      • Left As Int
      • Top As Int
      • Visible As Boolean
      • Width As Int

ezgif.com-crop.gif
 

Attachments

  • B4j Sample.zip
    2.4 KB · Views: 553
  • B4a Sample.zip
    8.7 KB · Views: 574
  • b4i Sample.zip
    2.6 KB · Views: 473
  • B4XPages_LoadingIndicators.zip
    16.8 KB · Views: 613
  • SD_LoadingIndicator.B4xLib
    3.7 KB · Views: 252
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update rel. 0.02


Add new Indicator
ezgif.com-crop.gif
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
Perché (why) tre progetti d'esempio (three sample projects)? [teaching Italian ? ]

Take this one (B4XPages), "create" the B4i layout (just copy & past views & script) and add it (since, as you know, I don't have B4i) and remove those samples.
 

Attachments

  • SD_LoadingIndicators.zip
    15.9 KB · Views: 414

Star-Dust

Expert
Licensed User
Longtime User
Perché (why) tre progetti d'esempio (three sample projects)?

Take this one (B4XPages), "create" the B4i layout (just copy & past views & script), since, as you know, I don't have B4i, and remove those samples.
Good idea. In the future I will do the B4Xlib examples like this.
 

Star-Dust

Expert
Licensed User
Longtime User
very pretty.

And with more color parameters.
The idea is interesting, but since all the indicators have the same parameters, only the Style changes.

To get what you want I should include the ability to select multiple colors for all styles. But not all styles need it.

If I find a solution, I enter it
 

Star-Dust

Expert
Licensed User
Longtime User
Perché (why) tre progetti d'esempio (three sample projects)? [teaching Italian ? ]

Take this one (B4XPages), "create" the B4i layout (just copy & past views & script) and add it (since, as you know, I don't have B4i) and remove those samples.
I tweaked to make it work on the B4i and also put in a necessary change for android when the app pauses and then resumes
 

Star-Dust

Expert
Licensed User
Longtime User
View or B4XView
It is actually more correct this way, because it is only for B4A
B4X:
Private Sub B4XPage_Appear
    #IF B4A
    For Each v As View In Root.GetAllViewsRecursive
        If v.Tag Is SD_LoadingIndicator And v.Visible = True Then
            Dim x As SD_LoadingIndicator = v.Tag
            x.Show
        End If
    Next
    #END IF
End Sub
or
B4X:
Private Sub B4XPage_Appear
    #IF B4A
    For Each v As B4XView In Root.GetAllViewsRecursive
        If v.Tag Is SD_LoadingIndicator And v.Visible = True Then
            Dim x As SD_LoadingIndicator = v.Tag
            x.Show
        End If
    Next
    #END IF
End Sub
 

TILogistic

Expert
Licensed User
Longtime User
Only playing with three basic colors
 

Attachments

  • 2.gif
    2.gif
    286.6 KB · Views: 392
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Only playing with three basic colors
In the majority it is not needed. If I find a sensible way I will insert it.

Please do not open or access the sources of my libraries. Even if it is a B4XLib library, it is not allowed to decompress it, modify it, change its name or redistribute it without the permission.
 
Last edited:

TILogistic

Expert
Licensed User
Longtime User
In the majority it is not needed. If I find a sensible way I will insert it.

Please do not open or access the sources of my libraries. Even if it is a B4XLib library, it is not allowed to decompress it, modify it, change its name or redistribute it without the permission.
Only playing!!
 

LucaMs

Expert
Licensed User
Longtime User
Please do not open or access the sources of my libraries. Even if it is a B4XLib library, it is not allowed to decompress it, modify it, change its name or redistribute it without the permission.
Only playing!!
I think we need to discuss this point (not here - will anyone open a thread about this? - but for the moment I want to comment on these two posts).

My opinion is that if a developer publishes a b4xlib library he must consider it as all the example projects published on the site (they too are zip files), that is freely usable and modifiable by anyone; otherwise he would have to compile his libraries the "classic way" and publish these.
 

Star-Dust

Expert
Licensed User
Longtime User
I think we need to discuss this point (not here - will anyone open a thread about this? - but for the moment I want to comment on these two posts).

My opinion is that if a developer publishes a b4xlib library he must consider it as all the example projects published on the site (they too are zip files), that is freely usable and modifiable by anyone; otherwise he would have to compile his libraries the "classic way" and publish these.
Already discussed with Erel, and not allowed. Otherwise we would have published the bas files.

B4xlib is published for these reasons:
1. Best for the compiler. Changing compiler version to older libraries versions may have problems. So there are no problems
2. You use only one file for all platforms and not one for single platform
3. In the case of B4i, if you use the Builder, you need to ask for permission from erel to build a library. With B4xLib it is not necessary

The latter reason is the main reason why I use the B4xLib.

P.S. It is clear that there is a risk, but going to publish changes as Oparra did seems excessive to me.
It's like stealing a neighbor's bike and walking in front of the window with the stolen bike .... At least hide ... Then if the neighbor calls the police, don't complain
 

LucaMs

Expert
Licensed User
Longtime User
Orrenda! Horrible

1.gif


I was trying to imitate one I saw. I'll fix it. It does not use your library ? (nor the canvases, at the moment, just 3 Labels, but I will have to do it, so it doesn't work).

I would like to show you what I saw but underneath there is a well-known brand :confused:
 
Top