views:

159

answers:

1

Hi everyone,

I have an app widget which runs neatly. However, I am unable to highlight a click on a linked item. I've seen it in the standard app widgets like 'Music' and 'Power Control', for instance. Moreover, I've also been studying the Music app widget's source at album_appwidget.xml. The only thing I could think of is the LinearLayout defined at lines 23-35 which states
android:clickable="true"
Unfortunately, this does not work for me. So does anyone have a hint on how to highlight a click on an app widget? I've tried the LinearLayout, TextView and Button. None of them displayed a border as a highlight.

Thanks in advance, Steff

+1  A: 

you need to create images for those states like focussed state, pressed etc like in a button and define them in your background. Try looking at the custom buttons where its explained how to accomplish the task thats similar to your needs. http://www.gersic.com/blog.php?id=56. if you want to look more and add more states you may ge better idea if you look at the android source code for buttons where they have images for each state of the button and every other widget.

achie
thanks mate, that was quick. i'll look into this. sounds promising
steff
Thanks again, worked out perfect. Great work
steff