I want to shift a little bit the text on the button that is currently pressed. In my case the button has custom background and the button will look much better if the text will be shifted.

I made two NinePath images with different paddings:

![enter image description here](https://i.stack.imgur.com/LEZjJ.png) 

![enter image description here](https://i.stack.imgur.com/NpdEl.png)

And set them using a selector:

```
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/btn_pressed" android:state_pressed="true"/>
    <item android:drawable="@drawable/btn"/>

</selector>

```

This doesn't work, the text remains on its position when the button is pressed (and the background is swapped).

Are my NinePath images OK? Is there any way to shift the text without setting touch listeners?

P.S. Same question was asked already but the "answer" is exactly the solution I tried: <https://stackoverflow.com/a/7677098/694770>