Android Question How to Remove NinePatch from a Button?

EduardoElias

Well-Known Member
Licensed User
Longtime User
I couldnt find answer on the forum.

After applying ninepatch using the SetNinePatchButton I want to remove the png image from that button and return to the "normal"

How?
 
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.
Code: Copy
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
 
Upvote 0

Similar Threads

Replies
4
Views
3K
D
  • Question Question
Replies
11
Views
6K
Deleted member 103
D
Replies
42
Views
69K
Back
Top