If you ever have a need to access a Bubble Level from within your B4A project, then here is one that you can use.
Extract font.zip and then copy this folder into the /Files folder of your B4A project
Extract LevelRes.zip and then copy the folder and its contents to be on the same folder level as that of the /Files folder of the B4A project.
The app has a menu for calibration and to change settings (amongst others making a sound when the device is level)
Take note of the B4A manifest file.
Sample Code:
Extract font.zip and then copy this folder into the /Files folder of your B4A project
Extract LevelRes.zip and then copy the folder and its contents to be on the same folder level as that of the /Files folder of the B4A project.
The app has a menu for calibration and to change settings (amongst others making a sound when the device is level)
Take note of the B4A manifest file.
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: b4aLevel
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\LevelRes
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim bl As Level
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
bl.Initialize("bl")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
bl.Start_Level
End Sub