I want to put an image in the imageview using glilde. I want the image to be croped from top rather than center
Use one of https://github.com/wasabeef/glide-transformations or roll your own.
you mean:
.bitmapTransform(new CropTransformation(context,300,100,CropTransformation.CropType.TOP))
but is it possible to avoid the dimensions. or not mention them. I want autofit with crop-top
I think you can just say 0,0,TOP as in the default constructor, though it looks weird because it doesn't use outWidth. You may have to copy and modify that transformation to use the "out" size instead of mWidth or source.getWidth to make it more flexible/efficient. You can try to open an issue with him to see why it's behaving this way.
Most helpful comment
I think you can just say
0,0,TOPas in the default constructor, though it looks weird because it doesn't useoutWidth. You may have to copy and modify that transformation to use the "out" size instead ofmWidthorsource.getWidthto make it more flexible/efficient. You can try to open an issue with him to see why it's behaving this way.