How set imageview scaletype to topCrop

前端 未结 3 498
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-06 01:23

I\'m coding android and I have a imageview. I want to set scaletype of this to topcrop. I could find centercrop in options, but it\'s not my request. How do I do?

3条回答
  •  臣服心动
    2020-12-06 01:46

    I don't believe you need a custom Image View for this. All you have to do is set the scaleType to matrix and set a custom matrix to the ImageView.

    Refer: https://stackoverflow.com/a/38049348/4747587

提交回复
热议问题