code: public ImageView addNewImageView(Drawable drawable, float pScale_Left, float pScale_Top, float pScale_Width, float pScale_Height, boolean pDuplicateState) {
          ImageView lNewImageView = new ImageView(getContext());
          lNewImageView.setImageDrawable(drawable);
          lNewImageView.setScaleType(ScaleType.FIT_XY);
          lNewImageView.setDuplicateParentStateEnabled(pDuplicateState);
  
          addView(lNewImageView, pScale_Left, pScale_Top, pScale_Width, pScale_Height);
          return lNewImageView;
      }
docs: adds new ImageView with (Drawable, Left, Top, Width, Height, DuplicateState) parameters
  sets Image of ImageView with Drawable parameter
  @param drawable
  @param pScale_Left
  @param pScale_Top
  @param pScale_Width
  @param pScale_Height
  @param pDuplicateState
  @return