Your Digital Media Has Never Looked So Good

User avatar
Topic Author
Posts: 78
Joined: Mon Apr 11, 2011 10:48 am

9-patch button backgrounds

Thu Mar 22, 2018 12:14 pm

I've been playing with trying to get 9-patch images to work for button backgrounds, namely buttons with rounded corners. Does anyone know if this is possible, and if so what tweaks did you have to do to the image and/or button to get it to work?
Posts: 149
Joined: Tue Aug 12, 2014 4:44 am

Re: 9-patch button backgrounds

Fri Mar 23, 2018 10:58 am

I use 9-patch images heavily.  Which component are you using and what field are you setting?  Button? ButtonGroup?  Maybe you can share the 9-patch image file you are using for your source.
User avatar
Posts: 37
Joined: Wed Feb 15, 2017 7:22 am

Re: 9-patch button backgrounds

Fri Apr 13, 2018 8:02 am

You could also create your own button or extension on the button. We created a new button that has a lot more options like: adding an icon, setting alignment and padding for the icon/text, handle colours for (un)focused state, handle fonts and also support 9.patch images for the background or focus state. 
We actually did the same for the input field and you can add as much options as you like of course.

Who is online

Users browsing this forum: No registered users and 7 guests