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
Use TransitionManager.begainDelayTransition() apply Fade transition on SimpleDraweeView from visible to invisible. SimpleDraweeView disappear directly without fade out effect.
Before Android 7.0 ImageView will call Drawable.setVisible() method when setVisibility method called, so when call GenericDraweeView.setVisibility(INVISIBLE) method will lead RootDrawable to invisible.
When begin transition, Fade direct modify target view visibility flag to restore target view visibility, but it will not change RootDrawable to visiable.
And then when GenericDraweeView try to draw RootDrawable through RootDrawable.draw() method, it just return because it is invisiable.
There is a simple way to fix issue: just remove isVisible judgement in RootDrawable.draw() method, like this:
public void draw(Canvas canvas) {
if (mVisibilityCallback != null) {
mVisibilityCallback.onDraw();
}
super.draw(canvas);
if (mControllerOverlay != null) {
mControllerOverlay.setBounds(getBounds());
mControllerOverlay.draw(canvas);
}
}
I read most of Drawable source code, such as BitmapDrawable, ColorDrawable etc, none of drawable skip draw when it is invisible. When view is invisible who own drawable, it will skip draw and will not call Drawable.draw() method, so this modification will not increase performance overhead and can keep same draw behaviour with all other drawable.
May I open a pr to fix this issue?
Additional Information
Fresco version: 2.0.0
Platform version: Android 5.0
The text was updated successfully, but these errors were encountered:
@oprisnik Yeh, but the problem has not been fixed. I read Drawable document about setVisiable method, it point out this method just a hint used by drawable, but does not impact drawable's behavior. So, I think RootDrawable.draw method is not correct.
There is my solution: #2391
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.
Description
Use
TransitionManager.begainDelayTransition()
apply Fade transition on SimpleDraweeView from visible to invisible. SimpleDraweeView disappear directly without fade out effect.Reproduction
Sample Project
Solution
Before Android 7.0 ImageView will call
Drawable.setVisible()
method whensetVisibility
method called, so when callGenericDraweeView.setVisibility(INVISIBLE)
method will lead RootDrawable to invisible.When begin transition, Fade direct modify target view visibility flag to restore target view visibility, but it will not change RootDrawable to visiable.
And then when GenericDraweeView try to draw RootDrawable through
RootDrawable.draw()
method, it just return because it is invisiable.There is a simple way to fix issue: just remove isVisible judgement in RootDrawable.draw() method, like this:
I read most of Drawable source code, such as BitmapDrawable, ColorDrawable etc, none of drawable skip draw when it is invisible. When view is invisible who own drawable, it will skip draw and will not call
Drawable.draw()
method, so this modification will not increase performance overhead and can keep same draw behaviour with all other drawable.May I open a pr to fix this issue?
Additional Information
The text was updated successfully, but these errors were encountered: