У меня есть одно приложение, которое будет использовать навигацию по фрагментам с использованием компонента навигации,
навигация работает нормально, но фрагмент не заполняет экран ...
![fragment not filling](https://i.stack.imgur.com/4sWdZ.png)
активность_основ. xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_container"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@color/black"
/>
фрагмент_основы. xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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:background="@color/colorAccent"
tools:context=".MainFragment">
<ImageButton
android:id="@+id/loginButton"
android:layout_width="108dp"
android:layout_height="108dp"
android:layout_marginTop="18dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:background="@color/black"
android:scaleType="fitXY"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:srcCompat="@drawable/loginicon" />
<ImageButton
android:id="@+id/playButton"
android:layout_width="106dp"
android:layout_height="108dp"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="18dp"
android:background="@color/black"
android:scaleType="fitXY"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:srcCompat="@drawable/playicon" />
<ImageView
android:id="@+id/imageView"
android:layout_width="347dp"
android:layout_height="151dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/robotface" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Welcome to MyAI"
android:textColor="#FFFFFF"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
Почему мой фрагмент не заполняет родительский?
android:layout_width="match_parent"
android:layout_height="match_parent"