Low quality of SVG icon if one of dimensions is wrap_content
Subuday opened this issue · comments
Describe the bug
If we use SVG decoder and load an SVG into ImageView with specific parameters(one dimension is wrap_content
, one dimension has exact size), we get a low quality image. If I use the same attributes, but load an icon using app:srcCompat
, there are no any problems with quality. Also, if I use exact dimensions, it also doesn't have any problems.
To Reproduce
- Connect SVG module.
- Create Image View
<ImageView
android:id="@+id/icon"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
Icon with android:layout_width="30dp" android:layout_height="wrap_content"
Icon with android:layout_width="30dp" android:layout_height="30dp"
Icon with android:layout_width="30dp" android:layout_height="wrap_content"
, but it was loaded using app:srcCompat
attribute.
Version
Coil: 2.0.0-rc03
Emulator Pixel 2 API 29
Huawei Y5 2018 API 27