Scaling image of ImageView while maintaining center point in same place

后端 未结 2 976
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 12:03

I have set a prescaled Bitmap as ImageView\'s source. Then I\'ve read Matrix of an ImageView and shift Bitmap of an ImageView via matrix.postTranslate(shi

2条回答
  •  太阳男子
    2021-01-03 12:08

    Take a look at my question here regarding creating a zoomable ViewGroup. I've described code snippets from my end solution, and some of it might be helpful.

    Extending RelativeLayout, and overriding dispatchDraw() to create a zoomable ViewGroup

提交回复
热议问题