Android FragmentContainerView和fragment之间的区别

Android FragmentContainerView和fragment之间的区别,android,Android,我有一个两个xml布局,其中只有一个定义的差异 - 这是关于差异还是您遇到的问题?你的标题似乎暗示了一件事,但你的问题暗示了另一件事。 <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"

我有一个两个xml布局,其中只有一个定义的差异 -


这是关于差异还是您遇到的问题?你的标题似乎暗示了一件事,但你的问题暗示了另一件事。
 <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/a_fragment_main"/>