开发者

zooming android image about centre of the image

开发者 https://www.devze.com 2023-01-19 10:33 出处:网络
I have an android application that needs to zoom an image about centre. i implemented the code 开发者_StackOverflow社区Matrix matrix = new Matrix();

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

精彩评论

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