You cannot just remove it. You need to replace it with a different StateListDrawable. It will be simpler to remove the button and create a new one instead.
B4X:
Dim NewButton As Button
NewButton.Initialize("event name")
Dim parent As Panel = OldButton.Parent
parent.AddView(NewButton, OldButton.Left, OldButton.Top, OldButton.Width, OldButton.Height)
OldButton.RemoveView
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.