1

Hi I have custom adapter which add ti gridview image

enter image description here

adapter code

public View getView(int position,  View convertView, ViewGroup parent) {
        ImageView imageView;
        if (convertView == null) {  // if it's not recycled, initialize some attributes
            imageView = new ImageView(mContext);
            imageView.setLayoutParams(new GridView.LayoutParams((tools.getWidth(mContext) - 30) / 3, (tools.getWidth(mContext) - 30) / 3));
            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        //    imageView.setPadding(8, 8, 8, 8);
        } else {
            imageView = (ImageView) convertView;
        }

        imageView.setImageBitmap(static_file[position]);
        imageView.setTag(p[position]);

        return imageView;
    }

In minimap I have image

play button

Help me please how I can programmatically add 2-rd image in 1-stfinal image

Mohammad Arman
  • 7,020
  • 2
  • 36
  • 50
Vahagn
  • 105
  • 1
  • 12

2 Answers2

0

Use a custom layout,

<RelativeLayout>
     <ImageView> containing the image you want
     <ImageView> the 2nd image having centerInParent=true
</RelativeLayout>

Refer to this Custom Adapter for List View

Community
  • 1
  • 1
TootsieRockNRoll
  • 3,218
  • 2
  • 25
  • 50
0

There is no way simply because your "transparent background" isn't transparent at all. It's just a part of the image, you should remove it as if it was white color, i've made it for, download this image and use itenter image description here

Nik Myers
  • 1,843
  • 19
  • 28