Не могу распределить элементы относительно начала и конца экрана
При написании разметки возникают проблемы с позиционированием элементов. Очень странно, так как все элементы вкладываются в родителя с родительской высотой и шириной. Но запустив программу на эмуляторе замечаю не тот результат который я ожидал. Перепробовал много способов, но ничего не выходит. Родитель ConstraintLayout в него вложен ScrollView в него в свою очередь вложен LinearLayout горизонтальной ориентации. Вот с ним то и проблемы. Почему то он меньше чем ScrollView. Скорее всего ошибка глупая, но я не могу ее найти. Прикладываю код разметки и screenshot результата на эмуляторе:
<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="@drawable/menu_background"
tools:context=".ui.MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/user_main_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/user_information"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="194dp">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/ivUserPhoto"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_marginStart="8dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="48dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_launcher"
app:civ_border_color="#ffffff"
app:civ_border_width="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvHelloUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/ivUserPhoto"
app:layout_constraintEnd_toStartOf="@+id/ivUserPhoto"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/ivUserPhoto"
tools:text="@string/good_morning_nikita" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="636dp"
android:background="@drawable/bottom_background"
android:orientation="vertical">
