mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-26 08:37:29 +00:00
Fix post open animation bug occurring on specific Android 10 devices. Should fix pt. 7 mentioned in https://github.com/austinhuang0131/barinsta/issues/264
This commit is contained in:
parent
c3de020f0e
commit
fececb5fd2
@ -138,7 +138,6 @@ public abstract class SharedElementTransitionDialogFragment extends DialogFragme
|
||||
final int initY = location[1];
|
||||
destView.setX(initX);
|
||||
destView.setY(initY - Utils.getStatusBarHeight(getContext()));
|
||||
destView.requestLayout();
|
||||
boundsCalculatedCount++;
|
||||
if (startCalled) {
|
||||
startPostponedEnterTransition();
|
||||
|
@ -242,7 +242,16 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
|
||||
@Nullable final ViewGroup container,
|
||||
@Nullable final Bundle savedInstanceState) {
|
||||
binding = DialogPostViewBinding.inflate(inflater, container, false);
|
||||
return binding.getRoot();
|
||||
final ConstraintLayout root = binding.getRoot();
|
||||
final ViewTreeObserver.OnPreDrawListener preDrawListener = new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
root.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
root.getViewTreeObserver().addOnPreDrawListener(preDrawListener);
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user