Wish ProgressDialogShow in XUI

IdasI4A

Active Member
Licensed User
Longtime User
I have made my first project in B4X and once finished, out of curiosity I looked at how many #if b4i there were, and almost 95% of them referred to ProgressDialogShow.
So I would like to suggest, if possible, if ProgressDialogShow, ProgressDialogHide could be included in XUI.
Thanks
B4X:
    #if b4i
    HUD.ProgressDialogShow("Leyendo....")
    #else if b4a
    ProgressDialogShow("Leyendo....")
    #End If   
    .....
    
    #if b4i
    HUD.ProgressDialogHide
    #else if b4a
    ProgressDialogHide
    #End If
 

TILogistic

Expert
Licensed User
Longtime User
sample:

1625728918063.png
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
out of curiosity I looked at how many #if b4i there were, and almost 95% of them referred to ProgressDialogShow.
BTW, this is a mistake. You should have instead created two subs:
B4X:
Public Sub ShowProgressBar (Text As String)

  #if b4i
    HUD.ProgressDialogShow(Text)
#else if b4a
ProgressDialogShow(Text)
    #End If 
End Sub

Public Sub HideProgressBar
'...

This way you encapsulate the platform differences instead of letting it propagate into your project.
 
Top