Android Question Question about Corner Radius

TechMedia

Member
Licensed User
Longtime User
Hello, sorry for bad english

I prepared my Layout with some buttons (StateListDrawable) with Corner Radius 20. ok, Looks good on designer.

I need to change the color of the button in runtime, so I put on Button Doen event

Sub Button1_Down
Dim b As Button
b = Sender 'Cast the Object to Button
b.Color = Colors.RGB(255,255, 255)
End Sub

The problem is: the corner radius is set to 0, a rectangle. How can i do to maintain de corner radius that i put on layout?

Thanks
 

Oswald

Member
Licensed User
Longtime User
Hello TechMedia,
I have same problem. I need to change the color of the button in my code but when I do this it sets the radius to 0.
button defined in designer... excatly the same story..
how did you solve this??

bx
 
Upvote 0
Top