Android Set ImageButton as Toggle

Posted by GuyNoir on Stack Overflow See other posts from Stack Overflow or by GuyNoir
Published on 2010-04-26T20:38:14Z Indexed on 2010/05/01 18:07 UTC
Read the original article Hit count: 267

How can I have an imagebutton stay in the 'pressed' state when it is clicked? Basically I just want the background to be the depressed background, but I can't figure out how to set it. At the moment, I've just copied the selected button background into my res folder, but when I set it as the background, it becomes blurry (since the original image is bigger than the button itself).

Normal Background: alt text What I'm getting: alt text alt text

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk