On Mon, Jul 23, 2012 at 4:03 PM, Justin Anderson <[email protected]>wrote:
> The "right" way to do it is to NOT subclass Button... Create a selector to > switch between drawables based on the state of the button and put the file > in drawable-nodpi. If the name of your selector file is "my_selector.xml" > then you would set the background of your button like so: > > android:background="@drawable/my_selector" > To add to that, take a look at this: http://developer.android.com/reference/android/graphics/drawable/StateListDrawable.html And then take a look at some of the buttons in the platform itself. You will see clearly how they are set up using states. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

