How can I adjust the padding for my button?

I have created a style for the pressed state in res/values/styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <style name="buttonPressed">
        <item name="android:paddingLeft">26px</item>
        <item name="android:paddingTop">16px</item>
        <item name="android:paddingRight">25px</item>
        <item name="android:paddingBottom">14px</item>
  </style>
</resources>

I have set the style attribute in my button.xml:

<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android";>
  <item android:state_pressed="true"
android:drawable="@drawable/button2" style="@style/buttonPressed" />
  <item android:drawable="@drawable/button1" />
</selector>

When I click on the button I do not see the padding change.  What am I
doing wrong?


Thanks,


-- 
Greg Donald
http://destiney.com/

-- 
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