A Albi Active Member Licensed User Longtime User Jan 23, 2015 #1 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?
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?
Erel B4X founder Staff member Licensed User Longtime User Jan 25, 2015 #2 Change 10 to 10dip. Upvote 0
A Albi Active Member Licensed User Longtime User Jan 25, 2015 #3 thanks! I can't believe I made this mistake after reading so many times about not doing this. Upvote 0