Android Question ColorDrawable settings different in designer and code

Albi

Active Member
Licensed User
Longtime User
Hello.

I made a button in designer with the settings:
corner radius = 10
border width = 1

I sometimes need to use the code to change it. I use the following code

B4X:
Dim cdwLevel As ColorDrawable
cdwLevel.Initialize2(Colors.Yellow,10,1,Colors.Black)

however, these don't match! it seems thinner and with less of a radius when set in code than compared to the designer.

how can i make these match?
 

Albi

Active Member
Licensed User
Longtime User
thanks! I can't believe I made this mistake after reading so many times about not doing this.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…