开发者

zooming android image about centre of the image

I have an android application that needs to zoom an image about centre. i implemented the code

开发者_StackOverflow社区 Matrix matrix = new Matrix(); matrix.setScale(scaleWidth, scaleHeight); imView.setScaleType(ScaleType.MATRIX); imView.setImageMatrix(matrix); imView.invalidate(); But i get the zooming about top left of the imView(imageView). i need to make it about centre. anybody please help


Use the four-argument version of setScale that takes a pivot point.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜