how to get displacement coordinates?

Author: n1ebeCreated Aug 21, 2023Updated Oct 8, 2023

Hello, how can I get the X,Y displacement position of my subsamplingImageView, I need to cut the visible part of the image and I can't get those missing values, thank you very much.

val currentXOffset = subsamplingImageView.translationX.toInt() val currentYOffset = subsamplingImageView.translationY.toInt()

give me 0

Thanks

Source: davemorrissey/subsampling-scale-image-view