Example: /iOS/Progress Test

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/iOS/Progress Test


Required plugins for this example: MBS iOS Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /iOS/Progress Test

This example is the version from Sun, 5th Nov 2022.

Project "Progress Test.xojo_binary_project"
Class App Inherits MobileApplication
End Class
Class Screen1 Inherits MobileScreen
Control Button1 Inherits MobileButton
ControlInstance Button1 Inherits MobileButton
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
EventHandler Sub Pressed() Me.Enabled = False timer1.RunMode = timer.RunModes.Multiple p = New MyProgressHUD(Self) counter =0 p.Mode = p.ModeIndeterminate p.LabelText = "Importing" p.DetailsLabelText = "Starting..." p.ButtonTitle = "Cancel" p.MinWidth = 150 // avoid it shrink and enlarge with different numbers p.show End EventHandler
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Run() counter = counter + 1 // user cancelled? If p.cancel Then p.hide p.DetailsLabelText = "Cancelled" Me.RunMode = timer.RunModes.Off Button1.Enabled = True End If Select Case counter Case 5 // let switch to determinate one for counting up from 0 to 50 p.Mode = p.ModeDeterminate p.DetailsLabelText = "Importing 50 items" Case 56 // we switch back for cleaning up p.Mode = p.ModeInDeterminate p.DetailsLabelText = "Cleaning up." Case 60 // and finished p.hide Me.RunMode = timer.RunModes.Off Button1.Enabled = True End Select If counter > 5 And counter <= 55 Then Dim c As Integer = counter-5 p.Progress = c / 50.0 p.DetailsLabelText = "Importing "+c.ToString+" of 50" End If End EventHandler
End Control
Property counter As Integer
Property p As MyProgressHUD
End Class
Class LaunchScreen Inherits iosView
End Class
Class MyProgressHUD Inherits ProgressHUDMBS
EventHandler Sub buttonAction() System.DebugLog CurrentMethodName Me.cancel = True End EventHandler
EventHandler Sub hudWasHidden() System.DebugLog CurrentMethodName End EventHandler
Property cancel As Boolean
End Class
End Project

The items on this page are in the following plugins: MBS iOS Plugin.


💬 Ask a question or report a problem