Hi all,
The next problem ?
I switched my app to B4x Pages , i am well aware that B4a can't handle different orientations.
But in my B4I module, the orientation switches but just dont show the other layout... so when i turn my iphone from portrait to landscape,
it switches but still has the layout of portrait mode.
PLayout is putting the Aplication Name,Version and image and a page bar on each page...
Since Working with Playout the orientation change doesnt work anymore ... What exactly do I have to do to change orientation and dont loose data on map..
Thanks a lot ...
The next problem ?
I switched my app to B4x Pages , i am well aware that B4a can't handle different orientations.
But in my B4I module, the orientation switches but just dont show the other layout... so when i turn my iphone from portrait to landscape,
it switches but still has the layout of portrait mode.
B4XPageModul:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout ("Info")
PLayoutI.Initialize(Root,"N")
Subs.SetBorderColor(lblFirma)
Subs.SetBorderColor(lblFirmware)
Subs.SetBorderColor(lblHardware)
Subs.SetBorderColor(lblModell)
Subs.SetBorderColor(lblSeriennummer)
txtFirma.TextColor = xui.Color_Yellow
txtHardware.TextColor = xui.Color_Yellow
txtModell.TextColor = xui.Color_Yellow
txtSeriennummer.TextColor = xui.Color_Yellow
txtFirmware.TextColor = xui.Color_Yellow
InfoClose.SetColorAndBorder(Var.limadarkblue,3dip,xui.Color_White,15dip)
InfoClose.Text = Language.Text(Var.v,74)
End Sub
Private Sub B4XPage_Appear
InfoText.Text = "Information"
lblFirma.Text = Language.Text(Var.v,97)
lblFirmware.Text = "Firmware"
lblModell.Text = Language.Text(Var.v,96)
lblHardware.Text = "Hardware"
lblSeriennummer.Text = Language.Text(Var.v,95)
End Sub
PLayout is putting the Aplication Name,Version and image and a page bar on each page...
PLayout:
'********************************************************************************************************************
' Die Navigationsbar mit den Seiten und oder PgmName und Version wird unten und oder oben auf die B4XPage gesetzt
' Parameter1 B4XPage
' Paremeter2 "A" beides, P nur Page, N nur Name und Version
'********************************************************************************************************************
Sub Class_Globals
Private xui As XUI
Private pnlparent As Panel
Private MP As B4XMainPage
Private AnwendungName As B4XView
Private AnwendungVersion As B4XView
#if b4a
Private LimaZeichen As B4XImageView
#end if
#if b4i
Private LimaZeichen As B4XView
#end if
Private lima As Bitmap
Public BChart As B4XView
Public BMenu As B4XView
Public BOnline As B4XView
Public BWerte As B4XView
Dim CurrentPageInfo As B4XPageInfo
Dim CallPage As String
Private cmbSpeicher As B4XComboBox
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(Parent As B4XView , Auswahl As String)
pnlparent = Parent
MP = B4XPages.MainPage
pnlparent.LoadLayout("Layout")
Subs.SetRoundBorderD(BMenu)
BMenu.Color = Colors.Transparent
BMenu.Text = "Menu"
BMenu.Tag = 1
Subs.SetRoundBorderD(BWerte)
BWerte.Color = Colors.Transparent
BWerte.Text = "Data"
BWerte.Tag = 2
Subs.SetRoundBorderD(BChart)
BChart.Color = Colors.Transparent
BChart.Text = "Chart"
BChart.Tag = 3
Subs.SetRoundBorderD(BOnline)
BOnline.Color = Colors.Transparent
BOnline.Text = "Online"
BOnline.Tag = 4
#if b4i
lima = LoadBitmap(File.DirAssets, "logolima-68x60.jpg")
#end if
#if b4a
lima = LoadBitmap(File.DirAssets, "logolima-68x60.jpg")
#end if
AnwendungName.TextColor = Colors.white
AnwendungName.Color = Colors.Transparent
AnwendungName.Text = Var.AnwendungNameStr
AnwendungVersion.Text = Var.AnwendungVersionStr
AnwendungVersion.TextColor = Colors.White
LimaZeichen.SetBitmap(lima)
' LimaZeichen.ResizeMode= "FIT"
If Auswahl = "N" Then
BMenu.Visible = False
BChart.Visible = False
BWerte.Visible = False
BOnline.Visible = False
AnwendungName.Visible = True
AnwendungVersion.Visible = True
End If
If Auswahl = "P" Then
BMenu.Visible = True
BChart.Visible = True
BWerte.Visible = True
BOnline.Visible = True
AnwendungName.Visible = False
AnwendungVersion.Visible = False
End If
BMenu.Color = Var.limadarkblue
If B4XPages.MainPage.CurrentPage = MP.PWerte Then
BMenu.Color = Colors.transparent
BWerte.Color = Var.limadarkblue
BOnline.Color = Colors.transparent
BChart.Color = Colors.transparent
End If
If B4XPages.MainPage.CurrentPage = MP.POnline Then
BMenu.Color = Colors.transparent
BWerte.Color = Colors.transparent
BOnline.Color = Var.limadarkblue
BChart.Color = Colors.transparent
End If
If B4XPages.MainPage.CurrentPage = MP.PChart Then
BMenu.Color = Colors.transparent
BWerte.Color = Colors.transparent
BOnline.Color = Colors.transparent
BChart.Color = Var.limadarkblue
End If
End Sub
Public Sub SetMenuColor
BMenu.Color = Var.limadarkblue
Log("Layout")
If B4XPages.MainPage.CurrentPage = MP.PWerte Then
BMenu.Color = Colors.transparent
BWerte.Color = Var.limadarkblue
BOnline.Color = Colors.transparent
BChart.Color = Colors.transparent
End If
If B4XPages.MainPage.CurrentPage = MP.POnline Then
BMenu.Color = Colors.transparent
BWerte.Color = Colors.transparent
BOnline.Color = Var.limadarkblue
BChart.Color = Colors.transparent
End If
If B4XPages.MainPage.CurrentPage = MP.PChart Then
BMenu.Color = Colors.transparent
BWerte.Color = Colors.transparent
BOnline.Color = Colors.transparent
BChart.Color = Var.limadarkblue
End If
End Sub
Private Sub NBB_Click
Private btn As B4XView
Private Index As Int
btn = Sender
Index = btn.Tag
If B4XPages.MainPage.CurrentPage <> MP Then
B4XPages.ClosePage(MP.CurrentPage)
End If
Select Index
Case 1
B4XPages.MainPage.CurrentPage = MP
' B4XPages.ShowPageAndRemovePreviousPages("MainPage")
B4XPages.ShowPage("MainPage")
Case 2
B4XPages.MainPage.CurrentPage = MP.PWerte
' B4XPages.ShowPageAndRemovePreviousPages("PWerte")
B4XPages.ShowPage("PWerte")
Case 3
B4XPages.MainPage.CurrentPage = MP.PChart
B4XPages.ShowPage("PChart")
Case 4
B4XPages.MainPage.CurrentPage = MP.POnline
' B4XPages.ShowPageAndRemovePreviousPages("PChart")
B4XPages.ShowPage("POnline")
End Select
End Sub
Since Working with Playout the orientation change doesnt work anymore ... What exactly do I have to do to change orientation and dont loose data on map..
Thanks a lot ...