this image of the activity that I am working on it
You can use a scrollview inside the main layout (e.g. ConstraintLayout or RelativeLayout) which also contains the topview.
<androidx.constraintlayout.widget.ConstraintLayout
...">
<TextView
....
/>
<ScrollView
....
>
<LinearLayout
.... />
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Can you try this
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/relative_layout_first"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Your 1st layout components here-->
</RelativeLayout>
<ScrollView
app:layout_constraintTop_toBottomOf="@id/relative_layout_first"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--Your 2nd layout components here-->
</RelativeLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>