Since Android 2.2 the method setAlpha() of ImageViews has become @RemoteViewable (or something like that, I don't remember that annotation). So you can simply call RemoteViews.setInt (viewId, "setAlpha", value).
I haven't tried it myself, but I believe it should work.. On Tue, Feb 22, 2011 at 11:50 PM, Jeffrey <jeffisagen...@gmail.com> wrote: > Another option that might be easier is if I could find a way to set an > alpha for the ImageViews themselves, but I can't find an easy way to > do that. > > On Feb 22, 4:42 pm, Jeffrey <jeffisagen...@gmail.com> wrote: > > Okay, after trying it out I am still facing issues. I can't seem to > > get the alpha to carry over after converting to Bitmap and using > > setImageViewBitmap(). This is my code so far: > > > > Drawable Sec1 = this.getResources().getDrawable(Test[180]); > > Sec1.mutate().setAlpha(80); > > Bitmap Section1 = ((BitmapDrawable)Sec1).getBitmap(); > > views.setImageViewBitmap(R.id.IVGhost1, Section1); > > > > With this I get no alpha, and if I try this: > > > > Bitmap Section1 = ((BitmapDrawable)Sec1).getBitmap().extractAlpha(); > > (Adding the extractAlpha() command) > > > > then I get an all black image. What am I missing? > > > > On Feb 22, 3:39 pm, Jeffrey <jeffisagen...@gmail.com> wrote: > > > > > > > > > > > > > > > > > I have traversed the internet and have yet to find an answer for this > > > problem. I have a set of image resources that I use in my widget, I > > > need to be able to reuse them but with differing Alpha levels. So far > > > the only command I can find to change alpha levels is .setAlpha(), but > > > that will not work as I am having to dispatch the image > > > via .setImageViewResource and I can't seem to get .setAlpha to work > > > with this command. > > > > > Is there a way to get this to work or am I going to have to double my > > > application size by including doubles of my resources? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- YuviDroid Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a widget to quickly access your favorite apps and contacts!) http://android.yuvalsharon.net -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en