Android Question View.Parent read-only

LucaMs

Expert
Licensed User
Longtime User
You are posting this wish in the wrong forum.
I know:
Mainly a "wish".


You can not change a Parent of a View.
I know this too and the reason is because Parent is read-only.

modViewsUtils - code module:
B4X:
Public Sub MoveB4XView(xView As B4XView, Destination As B4XView)
    xView.RemoveViewFromParent
    Destination.AddView(xView, xView.Left, xView.Top, xView.Width, xView.Height)
End Sub

B4X:
Public Sub MoveB4XView2(xView As B4XView, Destination As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
    xView.RemoveViewFromParent
    Destination.AddView(xView, Left, Top, Width, Height)
End Sub
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…