Sub Process_Globals
Public ActionBarHomeClicked As Boolean
Public ConfigMap As Map
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
' ' Truco para poder definir la orientación de la aplicación en función a un unas opciones de configuración y no que forzósamente esté fijo.
' Dim ConfigMap As Map
' If ConfigMap.IsInitialized = False Then ConfigMap.Initialize
'
' #if B4J
' If File.Exists(File.DirApp, "config.map") Then ConfigMap = File.ReadMap(File.DirApp, "config.map")
' #else
' If File.Exists(File.DirInternal, "config.map") Then ConfigMap = File.ReadMap(File.DirInternal, "config.map")
' #end if
'
Dim ph As Phone
ph.SetScreenOrientation(ConfigMap.getDefault("defaultorientation", 1)) ' -1 Unspecified, 0 Landscape, 1 Portrait
'ph.SetScreenOrientation(-1) ' -1 Unspecified, 0 Landscape, 1 Portrait
Dim pm As B4XPagesManager
pm.Initialize(Activity)
End Sub