I IdasI4A Active Member Licensed User Longtime User Jul 8, 2021 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2021 #2 There are several cross platform progress indicators, including AnotherProgressBar in XUI Views. It should be very simple to create a dialog with such progress bar and use it with B4XDialog.
There are several cross platform progress indicators, including AnotherProgressBar in XUI Views. It should be very simple to create a dialog with such progress bar and use it with B4XDialog.
TILogistic Expert Licensed User Longtime User Jul 8, 2021 #4 See the example, you can improve it or create a class for your projects. Attachments ProgressDialogShow.zip ProgressDialogShow.zip 3.9 KB · Views: 738
I IdasI4A Active Member Licensed User Longtime User Jul 8, 2021 #5 Thanks for the suggestion. I will give it a try
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2021 #6 IdasI4A said: out of curiosity I looked at how many #if b4i there were, and almost 95% of them referred to ProgressDialogShow. Click to expand... BTW, this is a mistake. You should have instead created two subs: Code: 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.
IdasI4A said: out of curiosity I looked at how many #if b4i there were, and almost 95% of them referred to ProgressDialogShow. Click to expand... BTW, this is a mistake. You should have instead created two subs: Code: 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.