I have a 9patch set as the background of my layout. However I still want to provide touch feedback by using the selectableItemBackground
attr.
I've tried using a <layer-list>
with the 9patch and selectableItemBackground
as the android:drawable
of the second <item>
, however that did not work.
I could also try making a selector and overlay the gradient drawable android uses for selectableItemBackground
in list_selector_background_pressed.xml
with a <layer-list>
. But in 4.4 KitKat the selected background color is actually gray instead of blue in JellyBeans, so I can't really hardcode it :(
There has to be an easier way, right guys? D: