W wl Well-Known Member Licensed User Longtime User May 23, 2012 #1 I am using a button that can stretch (using the scripting option). On the button I would like to place a PBG image (centered). What is the best way to keep a standard button (with a corner radius) but have an image centered into it ? Thanks
I am using a button that can stretch (using the scripting option). On the button I would like to place a PBG image (centered). What is the best way to keep a standard button (with a corner radius) but have an image centered into it ? Thanks
Erel B4X founder Staff member Licensed User Longtime User May 24, 2012 #2 In the designer you should change the button drawable to StateListDrawable and then change the default drawable to BitmapDrawable. BitmapDrawables include a Gravity property. You should set it to Center. Upvote 0
In the designer you should change the button drawable to StateListDrawable and then change the default drawable to BitmapDrawable. BitmapDrawables include a Gravity property. You should set it to Center.
M masskyy Member Jan 23, 2014 #3 Hello Erel, If I select StateListDrawable, the corner radius disappear. Is possible to have an imagen inside a button with a corner radius? Upvote 0
Hello Erel, If I select StateListDrawable, the corner radius disappear. Is possible to have an imagen inside a button with a corner radius?
klaus Expert Licensed User Longtime User Jan 23, 2014 #4 In the image it's up to you to make make the rounded corners. You need an image with transparent corners around the corner radius. Upvote 0
In the image it's up to you to make make the rounded corners. You need an image with transparent corners around the corner radius.