title: flutter reuse fragment float above other views
body: <p>I have two reuse fragments, and the second on is a flutter fragment, which behave strange.</p>
  <p>above Android API 29, flutter fragment will render above first fragment after the detail activity pop out of stack .</p>
  <p>under Android API 29, flutter fragment always render above all views in the main activity.</p>
  <p>I create this <a href="https://github.com/chdo002/float_fragment.git" rel="nofollow noreferrer">repository</a> to reproduce this error.</p>
  <p>This <a href="https://stackoverflow.com/questions/73347650/flutter-embedded-fragment-renders-above-other-views-when-scrolling">unsolved question</a> is similar to mine.</p>
  <p>this code  shows how I reuse fragments</p>
  <pre><code>    private void switchTo(String tag) {
  
          FragmentManager supportFragmentManager = getSupportFragmentManager();
          FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
          if (tag.equals(&quot;home&quot;)) {
              fragmentTransaction.show(homeFragment);
              fragmentTransaction.hide(notificationsFragment);
          } else {
              fragmentTransaction.show(notificationsFragment);
              fragmentTransaction.hide(homeFragment);
          }
          fragmentTransaction.commitNowAllowingStateLoss();
      }
  </code></pre>
  <p>this is where flutter fragment add to the view</p>
  <pre><code>    public View onCreateView(@NonNull LayoutInflater inflater,
                               ViewGroup container, Bundle savedInstanceState) {
          FragmentManager fragmentManager = getChildFragmentManager();
          if (mRepGoalsFlutterFragment1 == null) {
              mRepGoalsFlutterFragment1 = FlutterFragment.withNewEngine()
                      .build();
              fragmentManager
                      .beginTransaction()
                      .add(R.id.card_view7,
                              mRepGoalsFlutterFragment1,
                              TAG_REP_GOALS_FLUTTER_FRAGMENT_1)
                      .commit();
          }
  
          return inflater.inflate(R.layout.fragment_notifications, container, false);
      }
  </code></pre>