answering my own question ...
I could not find a way to do this without creating a custom view. in a nutshell, the custom view sets its own dimensions to the real (not scaled) dimensions of the extruded behind it.
public class ResizableImageView extends ImageView { public static interface OnSizeChangedListener { void onSizeChanged(int width, int height); } private OnSizeChangedListener onSizeChangedListener = null; public ResizableImageView(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int width = MeasureSpec.getSize(widthMeasureSpec); int height = width * getDrawable().getIntrinsicHeight() / getDrawable().getIntrinsicWidth(); setMeasuredDimension(width, height); if (onSizeChangedListener != null) { onSizeChangedListener.onSizeChanged(width, height); } } public void setOnSizeChangedListener(OnSizeChangedListener listener) { this.onSizeChangedListener = listener; } }
in my case, I needed to get a modified value so that the size of the other representations, hence the listener interface.
source share