Has anyone used 9patch images with compose? Can’t wrap my head around how to make it work. How can I set a 9patch as a background of, say, a
Box
?
🤘 1
Denis Sakhapov
10/14/2020, 8:23 AM
@Sergey Y. sorry for tagging you here. I just saw your thread where you were trying to figure out how to use
Drawable
-like backgrounds with buttons. Was just wondering if you were able to achieve what you needed?
s
Sergey Y.
10/14/2020, 10:45 AM
Hi. Well, I have ditched that idea and set simple gradient on the background. There will be an API for hoisting view state(pressed, selected, etc). Using that state it will be easy to provide custome background drawable to a button.
d
Denis Sakhapov
10/15/2020, 2:06 AM
I see. Seems like I’ll have to do this with standard android views and wrap it with compose functions for now.
Thanks for the reply tho, appreciate it!
n
nglauber
07/10/2021, 12:33 PM
Just leaving an answer here just in case someone like search for it: