Well. The pasted code at the end works in a test example, but not in my real
app :-(.
Anyhow, thanks for your attention.
R.
public StateListDrawable createSelectedUnSelectedDrawable(
Drawable normalDrawable, Drawable selectedDrawable) {
int[] pressed = new int[] { android.R.attr.state_pressed,
-android.R.attr.state_selected };
int[] selected = new int[] { android.R.attr.state_selected };
int[] normal = new int[] { android.R.attr.state_enabled };
StateListDrawable sld = new StateListDrawable();
sld.addState(pressed, selectedDrawable);
sld.addState(selected, selectedDrawable);
sld.addState(normal, normalDrawable);
return sld;
}
--
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