Hendrik,
You can see the source to power control widget here:
http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=summary
Drawables are here:
http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=tree;f=res/drawable
What I do in my app, is use ImageViews instead of buttons, have separate
state drawables for "on" and "off" states (rather than using
setChecked), and include "state_pressed" in those drawables.
I manually switch on/off drawables from code, whereas "state_pressed"
images work automagically.
-- Kostya
21.11.2010 10:19, Hendrik Greving ?????:
I can write a widget with a Button or ImageButton and assign a
StateDrawable as background or sourcein order to make an effect when
you click it. Besides that I have problems with the side of each
button, my main problem is this: how do I change the StateDrawable if
I want to change the image of the button from the AppWidgetProvider
but still want to preserve the click effect like a StateDrawable. The
power control widget in Android does things like that. Help would be
very appreciated, I've tried so many things already, but nothing works.
--
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
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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