tags:

views:

33

answers:

1

I'm trying to customize my buttons in my view a bit and give them my own look. Whenever I set a picture as a background so that the button looks different though, I seem to lose my cursor. I can use my trackball to go through the items still but when I come to one of my custom buttons the cursor does not show. I have the same problem with some TextViews that I made clickable. Any ideas?

(this is a button which i am trying to give a custom look by giving it a background. when i give it a background though, the cursor does not show when it is over it.)

+1  A: 

Your background drawable needs to be a state list drawable (or selector) so that you can provide a background image for the focused state. Take a look at the default background drawable used by buttons on Android: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/drawable/btn_default.xml;h=476508464e2d1ac87e6b6e417c829584d3e998b1;hb=master

Romain Guy
How does that work with me working with buttons though? How/where do I apply that?
Joshua Sutherland