I've noticed that if I programmatically change the button color of a button that is designed with rounded corners, that the corner rounding reverts to square corners. Is there any way to stop this? My buttons were designed to use ColorDrawable in the Designer.
You can re-generate the colordrawable programmatically with this code:
B4X:
Dim cd As ColorDrawable
cd.Initialize(Colors.Red, 15dip) 'you can also use Initialize2 with more parameters
Button1.Background =cd
Button1. text ="Dennis"
You can re-generate the colordrawable programmatically with this code:
B4X:
Dim cd As ColorDrawable
cd.Initialize(Colors.Red, 15dip) 'you can also use Initialize2 with more parameters
Button1.Background =cd
Button1. text ="Dennis"