Apologies - clarification - Not working means i don't see the background
9.png image.
I changed the Button element to point directly to the 9.png image - and
that works.
from: Button android:background=@drawable/dialpad_selector /Button
to: Button android:background=@drawable/dialpad /Button
Not sure, but here's my selector that I think works:
?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/orange_button
android:state_enabled=false/
item android:drawable=@drawable/orange_button
I tried your XML, and it seems fine. Maybe try a regular image that isn't
a nine-patch?
On Monday, January 14, 2013 2:52:05 PM UTC-6, dashman wrote:
got a button defined as
Button
android:id=@+id/button1
android:background=@drawable/dialpad_selector
i replaced with plain png files and they don't work either.
i put the png files (including the selector xml file) in the drawables
folder.
is that the right place?
this is my current state of the files
drawable/dialpad_selector.xml
--
selector
looking at the log files, is see
SkImageDecoder::Factory returned null
I know the images are ok (not using 9patch) and clicked in the imageviewer.
so most probably somehow the selector is not set up right.
is there a minimum set of states one needs to specify - i just specified 1
global
On Tuesday, January 15, 2013 10:36:05 AM UTC-6, dashman wrote:
i replaced with plain png files and they don't work either.
i put the png files (including the selector xml file) in the drawables
folder.
is that the right place?
Yes.
Also, I tried your layout, and that works fine for
Stupid error!
when i created the selector file to eclipse drawable folder - i set the
filename to
dialpad_select - assuming that the .xml would be auto appended.
if it's not - then then at compile time i should have gotton an error
message
because the dialpad_select.xml (just
Glad it is working.
BTW, if you want some decent 9 patches without a lot of work, I found this
app today:
https://play.google.com/store/apps/details?id=com.android9patch.viewer
On Tuesday, January 15, 2013 12:49:05 PM UTC-6, dashman wrote:
Stupid error!
when i created the selector file
why do you use an XML template if it's the same picture for all states?
how did you create the nine patch? Did you try it in an image view?
On Monday, January 14, 2013 3:52:05 PM UTC-5, dashman wrote:
got a button defined as
Button
android:id=@+id/button1
9 matches
Mail list logo