You are trying to load your own drawable from system resources. Get rid of
the getSystem thing.
04.04.2011 17:23 пользователь "Jake Colman" <[email protected]> написал:
>
> I want to be able to set the alpha value for my appwidget's background
> so that I can control its transparency at runtime. After googling a
> bit, I came up with the following:
>
> Drawable bg =
> Resources.getSystem().getDrawable(R.drawable.appwidget_bg);
> bg.setAlpha(100);
>
> This code throws a Resources$NotFoundException.
>
> I'm sure I missed something blazingly obvious. Can someone tell me what
> it is? I suspect that the problem is since this is a widget I can only
> work with the remote views - even though I can get programmatic access
> to the resource as I did above. If that is the case, what is the remote
> view equivalent of what I am trying to do?
>
> Thanks.
>
> --
> 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

-- 
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

Reply via email to