Changing fragment view has no effect
<p>Im changing the view of a fragment with the following code</p>

<pre><code>public void updateView() {
    View newView = LayoutInflater.from(mActivity).inflate(R.layout.fragment_lobby, (ViewGroup)mActivity.findViewById(mContainerId),
            false);

    ViewGroup container = (ViewGroup)mActivity.findViewById(mContainerId);
    container.removeAllViews();

    container.addView(newView);
}
</code></pre>

<p>Until the addView everything is fine, but then the new view aint added, the fragment remains empty.</p>

<p>If i change my code to display R.layout.fragment_lobby first and in updateView i change it to what is currently the first content then i see the R.layout.fragment_lobby correct and it voids the container again in updateView.</p>

<p>In all the other postings ive found about updating or modifying the view object of fragments that was the suggested code but it does not work for me. If you need some of the xml just tell me, they are both LinearLayout's and the content is (for testing) nearly the same, just different controls, nothing fancy.</p>
