D
Deleted member 103
Guest
Hi,
I have a different display between iPhone-6 + and iPhone-X, and I can't explain why.
The blue pointer is simply not displayed on the iPhone-X.
Maybe someone can tell me where my mistake is, I don't see it.
A test project is inserted.
IPhone-6+:
iPhone-X:
I have a different display between iPhone-6 + and iPhone-X, and I can't explain why.
The blue pointer is simply not displayed on the iPhone-X.
Maybe someone can tell me where my mistake is, I don't see it.
A test project is inserted.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private pnlRoot As Panel
'Variablen für der Zeiger
Dim pnlCrono As Panel
Dim imgSetupZeiger As ImageView
Dim pnlZeiger As Panel
Dim bmpNeedleBlue As Bitmap
Dim csvSetupZeiger As Canvas
Dim DRectCrono As Rect
Dim intfixedNeedle As Int = 1
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.LoadLayout("Main")
pnlRoot.LoadLayout("Page1")
NavControl.ShowPage(Page1)
NavControl.NavigationBarVisible = False
End Sub
Private Sub Page1_Resize (Width As Float, Height As Float)
'Log("Page1_Resize")
Dim r As Rect = Page1.SafeAreaInsets
pnlRoot.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
End Sub
Private Sub pnlRoot_Resize (Width As Float, Height As Float)
Log("pnlRoot_Resize")
SetupAnalogCrono
End Sub
Private Sub Page1_Appear
If intfixedNeedle <> 0 Then
intfixedNeedle = 0
InitCrono
End If
End Sub
Sub SetupAnalogCrono
If intfixedNeedle <> 0 Then
intfixedNeedle = 0
InitCrono
End If
ShowFixedNeedle
End Sub
Sub ShowFixedNeedle
Dim cv As Canvas
cv.Initialize(pnlCrono)
'Uhr-Untergrundsfläche färben
cv.DrawCircle(pnlCrono.Width / 2, pnlCrono.Width / 2, pnlCrono.Width / 2 - 4dip, Colors.White, True, 8dip)
'Aussenring zeichnen
cv.DrawCircle(pnlCrono.Width / 2, pnlCrono.Width / 2, pnlCrono.Width / 2 - 4dip, Colors.DarkGray, False, 8dip)
cv.Refresh
End Sub
Sub InitCrono
Dim NeedleWidth As Int
NeedleWidth = pnlCrono.Width / 12.23
bmpNeedleBlue.Initialize(File.DirAssets, "zeiger-blau_856x70.png")
DRectCrono.Initialize((pnlCrono.Width - NeedleWidth) / 2, 0, (pnlCrono.Width + NeedleWidth) / 2, pnlCrono.Height)
csvSetupZeiger.Initialize(imgSetupZeiger)
csvSetupZeiger.DrawColor(Colors.Transparent)
csvSetupZeiger.DrawBitmapRotated(bmpNeedleBlue, DRectCrono, 0)
csvSetupZeiger.Refresh
End Sub
IPhone-6+:
iPhone-X: