Android Question Loading Indicator in new Proyect

developer_123

Active Member
Licensed User
Longtime User
Good Day. I am trying to include the Loading Indicator class in a new project for both B4A and B4i (https://www.b4x.com/android/forum/t...ingindicator-loading-indicator.92243/#content). I already included the new module in the main folder and I included it in the project from the modules section as an existing module, but I don't know what I should do to make it appear in the designer and be able to select it as a view. In CustomView it does not appear, am I ignoring some step?

I appreciate any help.
 

mangojack

Expert
Licensed User
Longtime User
The latest version of these Loading Indicators are included in the XUI Views Internal Lib.

1. Remove any included Class module from your project.
2. In the Librarys Tab Check the XUI Views library.

Then in the designer you should be able to ... Add View > Custom View > B4XLoadingIndicator.
 
Upvote 0

PaulMeuris

Active Member
Licensed User
These are the steps I took to show a loading indicator (B4A):
- read the forum thread you mentioned: loading indicator and download the zip-file.
- in the project add the XUI Views library
- open the designer window from the example and copy for instance B4XLoadingIndicator3.
- open the designer window from the project and paste the B4XLoadingIndicator3.
- in the designer window generate the member (right click - generate)
- in the B4XMainPage from the project you will see the declaration of the B4XLoadingIndicator
- create (if not present) the B4XPage_appear subroutine and add the line to show the indicator
loading indicator:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private B4XLoadingIndicator3 As B4XLoadingIndicator
End Sub

Public Sub Initialize
   
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub B4XPage_Appear
    B4XLoadingIndicator3.show
End Sub

- run the app and that's it.
 
Last edited:
Upvote 0

developer_123

Active Member
Licensed User
Longtime User
Perfect thank you very much, it worked! I did not know that it was already included in Xui Views, Working !!!
Now I am left wondering how to include a CustomView from a Module.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…