title: Replace or create a new view within a Fragment?
body: <p>I built an activity which takes data from a rss file and shows them on a ListFragment; this is how I defined it on the layout file:</p>
  
  <pre><code>        &lt;fragment
          android:id="@+id/news_list_fragment"
          android:name="com.thecoffeedrinker.theforcereader.NewsListFragment"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/header_layout" /&gt;
  </code></pre>
  
  <p>It might happen that there is no connection available; this case I want the application to show a layout to warn the user about it, to be shown in the same layout area of the list. What's the best thing to do to achieve this? Should I create a "disconnected fragment" class and replace an instance with the list on the same activity? Should I load this layout within the List Fragment class? I tried to replace it but when I resume the activity it crashes...why is that? Thanks for your replies. </p>