'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.Tag = miPageCode 'so we can see in clsMenu we are getting the right root
Load_Layout
Options1.Initialize
Options2.Initialize
xui.SetDataFolder ("preferences")
prefdialog.Initialize(pnlOptions, "Preferences Dialog", pnlOptions.Width, pnlOptions.Height - 40dip)
prefdialog.LoadFromJson(File.ReadString(File.DirAssets, "PhonePats_Settings.json"))
prefdialog.SetEventsListener(Me, "PrefDialog")
LoadSavedData
End Sub