#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#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 ph As Phone
Dim imgz As ImageView
Dim lblInfo As Label
Dim lblTitle As Label
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("vdr") ph.SetScreenOrientation(1)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnVZ2_Click
StartActivity(vz2)
End Sub
2nd Layout
#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 ph As Phone
Dim btnCal As Button
Dim btnMain As Button
Dim editZ1 As EditText
Dim editZ2 As EditText
Dim imgZ As ImageView
Dim editVin As EditText
Dim lblVin As Label
Dim lblZ1 As Label
Dim lblZ2 As Label
Dim lblCal As Label
Dim lblCal1 As Label
Dim lblResultVout As Label
Dim lblVout As Label
Dim z1 As Int
Dim z2 As Int
Dim vin As Int
Dim lblAnsZ2 As Label
Dim lblAnsVin As Label
Dim lblAnsZ1 As Label
Dim lblAnsZ22 As Label
Dim lblPlus As Label
Dim lblKurungan1 As Label
Dim lblKurungan2 As Label
Dim lblGarisan As Label
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("vz2") ph.SetScreenOrientation(1)
End Sub
The UI cloud shows landscape mode even when it is set to set portrait only in code. If you set portrait only like I recommended, no user will ever see landscape mode on a real device
The UI cloud shows landscape mode even when it is set to set portrait only in code. If you set portrait only like I recommended, no user will ever see landscape mode on a real device