Button, default style but different color?

JogiDroid

Member
Licensed User
Longtime User
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?
 

JogiDroid

Member
Licensed User
Longtime User
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.

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
Top