/** * @param bitmap * The source bitmap. * @param opacity * a value between 0 (completely transparent) and 255 (completely * op
@akaya's answer is the right way except that the constructor is deprecated. The new way since API 4 would be to use:
BitmapDrawable drawable = new BitmapDrawable(getResources(), bitmap); drawable.setAlpha(100);