I am aware of the following post: Using Multiple Fragments in an single activity
What I am looking for is a specific answer to a specific problem. The result of the
Do the following:
Fragment to FrameLayout in the main activity XML, for both.layout_width from fill_parent to match_parent, for both FrameLayout in the main XML file, (ones created in step 1).layout_height from fill_parent to wrap_content, for both FrameLayout in the main XML file, (ones created in step 1).FrameLayout to ListView in the List Fragment XML because it is a List.LisView to @android:id/list, because it is needed for the ListFragment.Then let me know, Cheers.
Edit, also these:
return inflater.inflate(R.layout.list_fragment, null); to return inflater.inflate(R.layout.list_fragment, container, false);.return inflater.inflate(R.layout.input_fragment, null); to return inflater.inflate(R.layout.input_fragment, container, false);Edit:
Make your main activity XML file like this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/message_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/send_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
I took out the android:name"..." because I don't know what that is nor able to find out what it is, if you know what it does for sure, just add it back, should be okay.