I have a drawbale i want to place it in a gridView for each each image in this gridView. My drawable is a like a square but filled at the edges. So when i set this drawable as a background for the image, the image will cover the background which i dont need. I need this drawable to be in-front of the of the image not at the back.
My code look like this: enter code here
public class ComponentAlbums extends LinearLayout
{
public ClassImageLoader imageLoader;
public ComponentAlbums(Activity activity,Context context,WallPaperHD_Album item)
{
super(context);
imageLoader = new ClassImageLoader(activity);
setOrientation(LinearLayout.HORIZONTAL);
setBackgroundColor(Color.TRANSPARENT);
LinearLayout.LayoutParams Params = new LinearLayout.LayoutParams(120, 120);
ImageView imageView = new ImageView(context);
Params.gravity = Gravity.CENTER;
imageView.setScaleType(ScaleType.FIT_XY);
imageView.setPadding(10, 10, 10, 10);
//imageView.setAdjustViewBounds(true);
imageView.setBackgroundResource(R.drawable.frame_all_albums);//this line of code iam using to set the drawable infront of the image.
any help please.
A simple way to reverse the background and the actual image.
Hope this helps.