Hello,
Third post in a row about porting b4a to b4i (i hope it will be the last).
I create a draggable bottom card with this code:
When i want to show:
nothing is shown. But, this sub fires normally:
If I put at creation code a breakpoint and go step by step, then everything working fine!
After creation sub, I am just fetching scores from server in order to put them in a clv.
Thank you for your time.
Third post in a row about porting b4a to b4i (i hope it will be the last).
I create a draggable bottom card with this code:
B4X:
Sub B4XPage_Resize (Width As Int, Height As Int)
Dim r As Rect = B4XPages.GetNativeParent(Me).SafeAreaInsets
r.Top = Max(20, r.Top)
Root.SetLayoutAnimated(0, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
If Root.NumberOfViews = 0 Then CreateLayout
End Sub
Sub CreateLayout As ResumableSub
Root.LoadLayout("scoreboard")
PCLV.Initialize(Me, "PCLV", clvScoreboard)
clvScoreboard.Asview.Color = xui.Color_Transparent
clvScoreboard.GetBase.Height = Root.Height + Root.Top - pnlToolbar.Height
btnFilters.CustomLabel.Font = Font.CreateNew2("materialdesignicons",24)
btMenu.Initialize(Me,"btMenu")
btMenu.Create(Root,200,200,50,Root.Width,btMenu.Orientation_MIDDLE)
btMenu.HeaderPanel.LoadLayout("btMenuHeader")
btMenu.BodyPanel.LoadLayout("btMenuFilterScores")
btMenu.CornerRadius_Header = btMenu.HeaderPanel.Height/2
lblTitleHeader.Text = "Φίλτρα"
'stSex is ASSegmentedTab
stSex.AddTab2("Γυναίκα",Null,0)
stSex.AddTab2("Άνδρας",Null,1)
stSex.AddTab2("Άλλο",Null,2)
stSex.SelectedIndex(B4XPages.MainPage.user.sex,0)
'stRx is ASSegmentedTab
stRx.AddTab2("Rx",Null,1)
stRx.AddTab2("Scaled",Null,0)
Return Null
End Sub
When i want to show:
B4X:
Private Sub btnFilters_Click
btMenu.Show(False)
End Sub
nothing is shown. But, this sub fires normally:
B4X:
Sub btMenu_Open
log("ok")
End Sub
If I put at creation code a breakpoint and go step by step, then everything working fine!
After creation sub, I am just fetching scores from server in order to put them in a clv.
Thank you for your time.