I am trying to create a scalable container and I am targeting API 14+
In my onScale (I use ScaleGestureDetector to detect scaling) I am doing something like this:
public boolean onScale (ScaleGestureDetector detector) { float scaleFactor = detector.getScaleFactor(); setScaleX(getScaleX() * scaleFactor); setScaleY(getScaleY() * scaleFactor); return true; };
This works, but the zoom is not smooth. In fact, it flickers markedly.
I also tried this with the hardware layer, thinking that scaling will happen on the GPU after the texture is loaded and therefore will be very fast. But it didnβt matter - the zoom is not smooth and sometimes flickers.
What am I doing wrong?
performance android android-ui hardware-acceleration
numan salati
source share