我有两个行为不同的 XML 布局,唯一的区别是一个使用了新的
<androidx.fragment.app.FragmentContainerView
另一个,年长的:<fragment在 AndroidStudio 中,如所附照片所示,在第一种情况下,我看不到布局。在其他布局中,我这样做。
它是 Android Studio 3.6.3 的错误,还是定义问题,如何解决?
<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"/>
Run Code Online (Sandbox Code Playgroud) android ×1