Не корректно работают два FragmentContainerView в одном layout

Имею вот такую разметку

<?xml version="1.0" encoding="utf-8"?>
<layout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <variable
            name="viewModel"
            type="com.example.screen_profile.presentation.vm.ProfileViewModel" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/head_fragment"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:name="com.example.screen_profile.presentation.ui.HeadFragment"/>

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/description_fragment"
            android:name="com.example.screen_profile.presentation.ui.DescriptionFragment"
            android:layout_width="match_parent"
            android:layout_height="16dp"/>
    </LinearLayout>
</layout>.

Проблема заключается в том что на экране появляется только один фрагмент (второй DescriptionFragment). Какие могут быть причины такого поведения?


Ответы (0 шт):