-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android N with Fragment bug #1841
Comments
Hi @hcadoid, thanks for raising this issue. What do you mean by "fragment jump"? Is this a particular fragment transition? Also which Fresco library are you using? Would be great if you can provide some small code sample that reproduces the issue. |
yes,I use fresco and Glide to compare. "fragment jump" is fargment Transaction.
} FrescoMainFragment
OtherFragment
} |
Android N changed visibility handling for Drawables. I've added a workaround, see #1445:
|
@oprisnik This does not work。 s1= (SimpleDraweeView) mView.findViewById(R.id.s1); Glide.with(this).load("http://odqp9ta7o.qnssl.com/5429034688435023872").into(s3); Glide.with(this).load("http://odqp9ta7o.qnssl.com/5468585586862010368").into(s4); |
Does not work setLegacyVisibilityHandlingEnabled on Android N galaxy s8+, fresco 1.5 |
I confirm that setLegacyVisibilityHandlingEnabled doesn't work on Android N Sony Xepria Z5, fresco 1.5. |
I already created a sample project to reproduce this problem. Please take a look at it. Thanks! |
@oprisnik can you fix this problem soon? |
I don't think I'll have time for a proper fix soon. However, doing something along the lines of setExitSharedElementCallback(new SharedElementCallback() {
@Override
public void onSharedElementEnd(List<String> names,
List<View> elements,
List<View> snapshots) {
super.onSharedElementEnd(names, elements, snapshots);
for (final View view : elements) {
if (view instanceof SimpleDraweeView) {
view.post(() -> {
view.setVisibility(View.VISIBLE);
view.requestLayout();
});
}
}
}
}); as mentioned in #1445 should work. The problem is that Google changed the visibility API and I didn't find an easy way to fix that for Drawee. |
Pull requests are welcome :) |
Thanks for your suggestion. But I am still in the dark, where shall I place this code? |
I don't know why, but if I replace hide() and add() by replace() fragment, the problem has gone. |
Same here. I want to achieve animation in transaction with hide and show fragments. All images disappear during animation. |
This is an issue with |
@super-hu did you solve this bug? |
Hi;
device:google pixel Android 7.1 and hauwei mate9 Android 7.0
Fresco is not visible on Android N devices, using the fragment jump, Android N below is ok.
Tested the other library is ok .
initialization,one/two:fresco , Three four:Glide
start fragment:
The text was updated successfully, but these errors were encountered: