0

I use constraintlayout for container. I have to add images from camera and gallery in to container, so I have to use layout param. When I add imageview and set it to container, I have not access to under imageview. I have to do events move, rotate, zoom. I have to access imageview with touch listener. please help me. thanks.

layoutParams = (ConstraintLayout.LayoutParams) ivCarpet.getLayoutParams();
        layoutParams.width = Math.round(ViewUtil.dpToPx(workSpaceWidth));
        layoutParams.height = Math.round(ViewUtil.dpToPx(workSpaceHeight));
        carpetContent.removeView(ocv);
        ivCarpet.setLayoutParams(layoutParams);


 imageView.setLayoutParams(layoutParams);
        imageView.setMaxWidth((int) sizeImage[0] / 4);
        imageView.setMaxHeight((int) sizeImage[1] / 4);
        imageView.setScaleType(ImageView.ScaleType.MATRIX);
        carpetContent.addView(imageView);
ankuranurag2
  • 2,300
  • 15
  • 30
  • what is not working here? – karan Feb 06 '19 at 06:47
  • I don't know. but for touch event just access to up image view. – shima jalali Feb 06 '19 at 06:58
  • your question is unclear can you rephrase it so it can be easier to understand what you want or what is the issue. – karan Feb 06 '19 at 06:59
  • I have base layout . and I want to add it some images from gallery, when images add to my layout just I access to upper image view. and I cant touch under images. I have to select other images that added in layout for events. but just move or rotate upper image. thank you. – shima jalali Feb 06 '19 at 07:06

0 Answers0