#If b4j
Sub CreateListItemB4j(Text As String, Width As Int, Height As Int) As Pane
' Do something B4j
End Sub
#Else If b4a
Sub CreateListItemB4a(Text As String, Width As Int, Height As Int) As Panel
' Do something B4a
End Sub
#End If
Sub CreateListItem(Text As String, Width As Int, Height As Int) As B4XView
#if b4j
Return CreateListItemB4j(Text, Width, Height)
#else if b4a
Return CreateListItemB4a(Text, Width, Height)
#End If
End Sub
Sub test()
' Deklaration
#if b4j
Dim pnl As Pane
#Else if b4a
Dim pnl As Panel
#End If
pnl = CreateListItem("Test", 300, 300)
End Sub