You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting a null drawable strangely causes the Drawables without intrinsic dimensions (such as a solid color) are not supported exception to trigger. It seems like passing a null value to the setImageDrawable function actually results in setting a BitmapDrawable, see screenshot below.
Library version: 1.8.0
Reproducible in official demo app: no
Device / Android version: OnePlus 6T API 29
To Reproduce
Steps to reproduce the behavior, possibly in the demo app:
Open something using ZoomImageView
use zoomImageView.setImageBitmap(null)
See error
Expected behavior
Not sure, but I guess it should be possible to set a null image (simply show nothing at all).
Screenshots
Logs
java.lang.IllegalArgumentException: Drawables without intrinsic dimensions (such as a solid color) are not supported
at com.otaliastudios.zoom.ZoomImageView.setImageDrawable(ZoomImageView.kt:95)
at android.widget.ImageView.setImageBitmap(ImageView.java:767)
at de.markusressel.kodeeditor.library.view.CodeEditorLayout$updateMinimapImage$$inlined$apply$lambda$1.run(CodeEditorLayout.kt:409)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
The text was updated successfully, but these errors were encountered:
Describe the bug
Setting a
null
drawable strangely causes theDrawables without intrinsic dimensions (such as a solid color) are not supported
exception to trigger. It seems like passing anull
value to thesetImageDrawable
function actually results in setting aBitmapDrawable
, see screenshot below.To Reproduce
Steps to reproduce the behavior, possibly in the demo app:
ZoomImageView
zoomImageView.setImageBitmap(null)
Expected behavior
Not sure, but I guess it should be possible to set a
null
image (simply show nothing at all).Screenshots
Logs
The text was updated successfully, but these errors were encountered: