The padding is constant in a selector, you cannot achieve what you want this
way.

On Nov 29, 2009 10:04 AM, "Jarett" <jarett.mill...@gmail.com> wrote:

Hi guys,

I'm having a bit of a problem with a custom button style. I have the
button states (9-patch drawables) set up in a <selector> drawable. The
style I'm going for is a button that looks like it gets pushed down,
i.e., you can see the front edge of the button until you press it. It
works fine for the button itself, but the contents of the Button (or
ImageButton) don't move when pressed, even though I have the 9-patch
areas set up to move the content area for the depressed button states.
It seems like it's keeping the same 9-patch areas no matter which
image it's showing.

Here's an animated GIF to help make the problem a little clearer,
since I'm awful at explaining things:
http://www.crappytools.net/button_problem.gif
The button moves when pressed, but the icon inside stays still. I
played with the Draw 9-Patch utility, and it shows that the content
area in the depressed image should be shifting downwards like
intended.

Any help is appreciated!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to