Hello,
Would it be possible to have access to the source view that was 'transformed' into a b4x view?
Sometimes you need to set properties to a label or imageview that are not available via B4Xview objects.
an example...
if you want to change click behaviour from somewhere else in the app you need to set L as global variable aswell or add extra arrays/list/maps just to keep track of the source views.
The sub below makes the source easier for B4A but now I see that it won't work for B4i as the userinteraction property ain't available for that object type.
ideal would be to have access to the source view as shown below then you still have direct access to all properties that the source view supports.
Would it be possible to have access to the source view that was 'transformed' into a b4x view?
Sometimes you need to set properties to a label or imageview that are not available via B4Xview objects.
an example...
B4X:
dim Lx as b4xview
dim L as label
L.initialize("")
Lx=L
if you want to change click behaviour from somewhere else in the app you need to set L as global variable aswell or add extra arrays/list/maps just to keep track of the source views.
The sub below makes the source easier for B4A but now I see that it won't work for B4i as the userinteraction property ain't available for that object type.
B4X:
Sub enableView(l As B4XView,enabled As Boolean)
#if B4A
l.Enabled=enabled
#else
l.UserInteractionEnabled=enabled
#end if
End Sub
ideal would be to have access to the source view as shown below then you still have direct access to all properties that the source view supports.
B4X:
Sub enableView(l As B4XView,enabled As Boolean)
#if B4A
l.sourceView.Enabled=enabled
#else
l.sourceView.UserInteractionEnabled=enabled
#end if
End Sub