iOS Question B4XDrawer The design is not visible

Sezgin Berber

Member
Licensed User
I get the screen with f8 in debug mode and I see the menu. But when I remove the breakpoint I see a black screen. How can I fix?


B4X:
Public Sub Show
    
    MenuCreate
    If pg.IsInitialized = False Then
        pg.Initialize("pg")
        pg.RootPanel.LoadLayout("cardpoint")
    End If
    lblCustomerName.Text = LoadingModule.CustomerName
    lblPlate.Text          = LoadingModule.Plate
    lblCardCode.Text      = LoadingModule.CardCode
    lblBalancePoint.Text = LoadingModule.BalancePoint
    
    listProduct = LoadingModule.listProduct
    For i = 0 To listProduct.Size-1
        Dim ls As List = listProduct.Get(i)
        Select i
            Case 0
                LabelList1.Text = ls.Get(0)
                lbl_SubList1.Text = ls.Get(1)
            Case 1
                LabelList2.Text = ls.Get(0)
                lbl_SubList2.Text = ls.Get(1)
            Case 2
                LabelList3.Text = ls.Get(0)
                lbl_SubList3.Text = ls.Get(1)
            Case 3
                LabelList4.Text = ls.Get(0)
                lbl_SubList4.Text = ls.Get(1)
        End Select
        
    Next
    
    list = LoadingModule.list
    For i = 0 To list.Size-1
        Dim ls As List = list.Get(i)
        Dim iv As ItemValue
        iv.Initialize
        clv.Add(CreateItem(ls,iv),iv)
    Next
    
End Sub

Private Sub CreateItem(arry As List,iv As ItemValue) As B4XView
    Dim p As B4XView = xui.CreatePanel("")
    p.Color=Colors.Transparent
    p.SetLayoutAnimated(0,0,0,95%x,60dip)
    p.LoadLayout("itemCard")

    lbl_date.Text = arry.Get(0)
    lbl_amount.Text = arry.Get(1)
    lbl_plate.Text = arry.Get(2)
    lbl_point.Text = arry.Get(3)
    lbl_name.Text = arry.Get(4)
    Return p
End Sub

Public Sub MenuCreate
    NavControl = Main.NavControl
    SetNavColors(0xFFB0F1FF)
    pg.Initialize("pg")
    pg.Title = "pg"
    pg.RootPanel.SetBorder(0, 0, 0)
    NavControl.ShowPage(pg)
    Drawer.Initialize(Me, "drawer", pg.RootPanel,250dip)
    Drawer.CenterPanel.LoadLayout("cardpoint")
    Drawer.LeftPanel.LoadLayout("leftMenu")
End Sub
Private Sub SetNavColors(clr As Int)
    Dim bar As NativeObject = NavControl
    bar.GetField("toolbar").RunMethod("setBarTintColor:", Array(bar.ColorToUIColor(clr)))
    bar = bar.GetField("navigationBar")
    bar.RunMethod("setBarTintColor:", Array(bar.ColorToUIColor(clr)))
    bar.SetField("translucent", False)
    Dim image As NativeObject
    image = image.Initialize("UIImage").RunMethod("new", Null)
    bar.RunMethod("setShadowImage:", Array(image))
    bar.RunMethod("setBackgroundImage:forBarMetrics:", Array(image, 0))
End Sub
 
Top