>>>>> "KV" == Kostya Vasilyev <[email protected]> writes:
KV> 12.04.2011 17:19, Jake Colman пишет: >> I have yet to figure this out so I though I'd try posting again. >> >> Given a widget with a background image specified in its layout, >> how can one set the background's transparency at runtime? >> >> I have tried Kostya's suggestion of calling the >> RemoteView.setInt() method and passing in setAlpha as the >> methodName but I get a reflection error. KV> Calling "setInt" for "setAlpha" works starting with 2.2 - where KV> ImageView.setAlpha is marked with @RemotableViewMethod. >> I know this is doable because other application widgets have >> sliders to set the transparency at runtime. But how? Kostya, Now I know for sure it's doable since you just released upgrades to your widgets that do it! Unfortunately, and I admit that I am being obtuse, I'm still not getting it. When I call RemoteViews.setInt(id,"setAlpha",value) what am I supposed to be passing in for the id parameter? It's not the layout id since that does not have a setAlpha method. I tried sending in the id of my background drawable but that gave me an error that it could not find the view. What's the magic incantation? Have you done a blog posting on this? -- Jake Colman -- Android Tinkerer -- 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

