Do the following:
- Change
Fragment
toFrameLayout
in the main activity XML, for both. - Change
layout_width
fromfill_parent
tomatch_parent
, for bothFrameLayout
in the main XML file, (ones created in step 1). - Change
layout_height
fromfill_parent
towrap_content
, for bothFrameLayout
in the main XML file, (ones created in step 1). - Change
FrameLayout
toListView
in the List Fragment XML because it is a List. - Change the id of this
LisView
to@android:id/list
, because it is needed for theListFragment
.
Then let me know, Cheers.
Edit, also these:
- Change
return inflater.inflate(R.layout.list_fragment, null);
toreturn inflater.inflate(R.layout.list_fragment, container, false);
. - Change
return inflater.inflate(R.layout.input_fragment, null);
toreturn 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.