davemorrissey / subsampling-scale-image-view

Android library (AAR). Highly configurable, easily extendable deep zoom view for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc.
Apache License 2.0
7.88k stars 1.2k forks source link

ScaleType :FitXy doesn't work. #560

Open passmanagerapp opened 3 years ago

passmanagerapp commented 3 years ago

The image doesn't fit the imageView

davemorrissey commented 3 years ago

I cannot answer bug reports when the template has been deleted. You haven't provided any of the requested information, particularly sample code, expected behaviour and screenshots of observed behaviour.

passmanagerapp commented 3 years ago

Here is the source code: It doesn't fit the screen <com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView android:id="@+id/animalDrawable" android:layout_width="match_parent" android:layout_height="match_parent" />

binding.animalDrawable.setImage(ImageSource.resource(R.drawable.ant)

Screenshot_1632730493

passmanagerapp commented 3 years ago

@davemorrissey

davemorrissey commented 3 years ago

This is working correctly, as you've configured it. scaleType is not supported by SSIV because it is not an ImageView. You may want setMinimumScaleType(SCALE_TYPE_CENTER_CROP) but as you haven't described what you're expecting I'm not sure.

passmanagerapp commented 3 years ago

Sorry if I was bad to explain my problem. My problem is the image doesn't fit the screen when I don't specify any setMinimumScaleType. In normal ImageView when I use scaleType= fitXy it does fit the screen. But there is no feature like fitXy in your library, I think.

passmanagerapp commented 3 years ago

For example in tablets when I use CENTER_CROP, it doesn't fit the screen. Screenshot_1633537744

passmanagerapp commented 3 years ago

@davemorrissey