I have a ListFragment displaying a list of items that created by the user. I have a ListView with it\'s id set to \"@android:id/list\" and a
ListFragment
ListView
I had a similar problem.
According to this when you need to add Fragments programmatically, you should add them to an existing ViewGroup.
Fragments
ViewGroup
So I removed the Fragment from the xml and used FrameLayout component in the replace() method.
Fragment
FrameLayout
replace()
You can also have a look here.
Hope this helps.