hi
i use a sub in code module to loadlayout to my activity
but when I declare them, the ide warns the objects of layout as uninitialized although it complies it correctly
please make it to recognize this kind of vars as of ones not to be initialized
i use a sub in code module to loadlayout to my activity
but when I declare them, the ide warns the objects of layout as uninitialized although it complies it correctly
please make it to recognize this kind of vars as of ones not to be initialized
B4X:
Sub AddLayoutToCustomView(cv As CustomListView,Layout As String) As Panel
Dim h As Int=0
Dim pnl As Panel
pnl.Initialize(Layout)
pnl.Width = 100%x
pnl.Height = 100%y
pnl.LoadLayout(Layout)
For Each vn As View In pnl.GetAllViewsRecursive
If vn.top+vn.Height>h And vn.Visible Then
h=vn.Height+vn.top
End If
Next
cv.Add(pnl,h,"0",False)
Return pnl
End Sub