J JogiDroid Member Licensed User Longtime User Mar 16, 2011 #1 I'd like to change color "theme" of the default button (gray) Default button scales well and looks good so just gradient or plain bitmap is not good enough for me.. So, how do I change it? What kind of drawable is the default buttons background? NinePatchDrawable?
I'd like to change color "theme" of the default button (gray) Default button scales well and looks good so just gradient or plain bitmap is not good enough for me.. So, how do I change it? What kind of drawable is the default buttons background? NinePatchDrawable?
Erel B4X founder Staff member Licensed User Longtime User Mar 16, 2011 #2 There is no way to do it without creating the new bitmaps yourself. I believe that it is a NinePatchDrawable. However for your specific application you can get similar result by using regular bitmaps. Upvote 0
There is no way to do it without creating the new bitmaps yourself. I believe that it is a NinePatchDrawable. However for your specific application you can get similar result by using regular bitmaps.
J JogiDroid Member Licensed User Longtime User Mar 16, 2011 #3 Erel said: There is no way to do it without creating the new bitmaps yourself. I believe that it is a NinePatchDrawable. However for your specific application you can get similar result by using regular bitmaps. Click to expand... Creating a NinePatchDrawable is no problem, but using it correctly with B4A... Does .SetBackgroundImage just replace existing image NinePatchDrawable that default Button uses or does it create new "plain" BitmapDrawable? Or can I just create a new NinePatchDrawable object from Bitmap and feed it to Button.Background? (does b4a support NinePatchDrawable object?) (Sorry, I could test these at home but I'm not there right now ) Upvote 0
Erel said: There is no way to do it without creating the new bitmaps yourself. I believe that it is a NinePatchDrawable. However for your specific application you can get similar result by using regular bitmaps. Click to expand... Creating a NinePatchDrawable is no problem, but using it correctly with B4A... Does .SetBackgroundImage just replace existing image NinePatchDrawable that default Button uses or does it create new "plain" BitmapDrawable? Or can I just create a new NinePatchDrawable object from Bitmap and feed it to Button.Background? (does b4a support NinePatchDrawable object?) (Sorry, I could test these at home but I'm not there right now )
Erel B4X founder Staff member Licensed User Longtime User Mar 16, 2011 #4 You can assign any drawable to Button.Background. However you will not be able to load the image as a NinePatchDrawable object. Edit: Such images are now supported: http://www.b4x.com/forum/basic4andr...torials/14283-nine-patch-images-tutorial.html Upvote 0
You can assign any drawable to Button.Background. However you will not be able to load the image as a NinePatchDrawable object. Edit: Such images are now supported: http://www.b4x.com/forum/basic4andr...torials/14283-nine-patch-images-tutorial.html