Hi,
how can I query and use a variable from a class in Designer? Is that even possible? If so, how?
Specifically, it concerns this code here:
I want to use the height of “StatusBarHeight” in the designer so that my toolbar adjusts accordingly.
how can I query and use a variable from a class in Designer? Is that even possible? If so, how?
Specifically, it concerns this code here:
B4X:
Private Sub StatusBarHeight As Int
Dim sHeight As Int
Dim jo As JavaObject
jo.InitializeContext
Try
Dim res As JavaObject = jo.RunMethod("getResources", Null)
Dim resourceId As Int = res.RunMethod("getIdentifier", Array("status_bar_height", "dimen", "android"))
If resourceId > 0 Then
sHeight = res.RunMethod("getDimensionPixelSize", Array(resourceId))
End If
Catch
Log("Fehler beim Verschieben: " & LastException.Message)
End Try
Return sHeight
End Sub
I want to use the height of “StatusBarHeight” in the designer so that my toolbar adjusts accordingly.