首页 > 解决方案 > 当我在前一个屏幕上使用带有 MotionLayout 的 ImageViewFilter 时,AppcompatImageView 不显示 VectorDrawable

问题描述

我有 2 个屏幕(Splash 和 Home 片段)。我在两个屏幕中都使用相同的图标(VectorDrawable Image)。

在 SplashFragment 中,我使用 MotionLayout 中的 ImageFilterView 来显示该图标。(用于更改“交叉淡入淡出”属性)

片段飞溅.xml

飞溅场景

在 HomeFragment 中,我使用 AppCompatImageView 再次显示该图标。

但在 HomeFragment 中,ImageView 不显示该图标(屏幕上仍有视图边界)。

首页片段

我不知道为什么在上一个屏幕上使用 ImageFilterView 时未加载 VectorDrawable。

(偏好示例项目https://github.com/NXAN2901/ImageFilterView-Problem

标签: android

解决方案


我发现这个问题在 ConstraintLayout 版本2.1.0-beta02得到修复

感谢您阅读


推荐阅读