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 <[email protected]> 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 <[email protected]> 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 [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

