I am using a linear layout and frame layout. In the linear layout I keep an image as background and in the frame layout I keep an imageView. In that imageView I give an image.>
Set transparency using setAlpha(float alpha)
. The below code works for me were I used an alpha value in float, 0 - 1.
1: Full Opaque
ImageView imageView = (ImageView) itemView.findViewById(R.id.imageView); imageView.setImageResource(mResources[position]); imageView.setAlpha(.80f);