title: Check fragment is presented in framelayout or not in android?
body: <p>Hi friends I have two framelayout in movies.xml namely <strong>container</strong>, <strong>detail_screen</strong>.In container will add <strong>movies.xml</strong> which contains listview ,and in detail_screen will have expandable listview called  <strong>movie_details.xml</strong>.Now want to check programatically in detail_screen is already fragment presented or not.if presented just want remove that fragment.I did by follwing and its working fine.</p>
  
  <pre><code>    if (getSupportFragmentManager().findFragmentByTag("MyFragment") != null) {
          getSupportFragmentManager().beginTransaction().remove(getSupportFragmentManager().findFragmentByTag("MyFragment")).commit();
  }
  </code></pre>
  
  <p>but is there any other way to find whether fragment is presented or not in frame layout in android by programatically .Thanks in advance</p>