Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ab97721 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't change visibility of fragment Views that aren't visible"

parents 84884684 0c3ab75c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1175,15 +1175,17 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
                                f.mView.setSaveFromParentEnabled(false);
                                if (container != null) {
                                    container.addView(f.mView);
                                    f.mIsNewlyAdded = true;
                                }
                                if (f.mHidden) {
                                    f.mView.setVisibility(View.GONE);
                                    f.mIsNewlyAdded = false; // No animation required
                                }
                                f.onViewCreated(f.mView, f.mSavedFragmentState);
                                dispatchOnFragmentViewCreated(f, f.mView, f.mSavedFragmentState,
                                        false);
                                // Only animate the view if it is visible. This is done after
                                // dispatchOnFragmentViewCreated in case visibility is changed
                                f.mIsNewlyAdded = (f.mView.getVisibility() == View.VISIBLE)
                                        && f.mContainer != null;
                            }
                        }