I am trying to add a fragment into a frame layout on a landscape view, but the runtime keeps coming back with: Configurations for content_main.xml must agree on the root element's ID.
Missing ID:
- layout-land
@+id/fragment:
- layout
I can't seem to figure this one out, and it is frustrating. Full XML for fragment and Linear layout below:
<?xml version="1.0" encoding="utf-8"?>
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment"
android:name="com.example.tasktimer.MainActivityFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:layout="@layout/fragment_main"
/>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="2"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<fragment
android:id="@+id/fragment"
android:name="com.example.tasktimer.MainActivityFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
tools:layout="@layout/fragment_main" />
<FrameLayout
android:id="@+id/task_details_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>