Лишние элементы исключил из кода.
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_weight="1"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed|snap"
app:popupTheme="@style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
Вот внутри ViewPager находятся фрагменты , вот их разметка
<android.support.v4.widget.NestedScrollView
android:id="@+id/nested_scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
android:fadeScrollbars="false"
android:fillViewport="true"
android:isScrollContainer="false"
android:scrollbarAlwaysDrawHorizontalTrack="true"
android:scrollbarAlwaysDrawVerticalTrack="true">
<android.support.constraint.ConstraintLayout
android:id="@+id/mainLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorQuestionBackground"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<include
android:id="@+id/question_tv"
layout="@layout/question_tv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/question_image" />
<include
android:id="@+id/question_image"
layout="@layout/question_image"
android:layout_width="match_parent"
android:layout_height="145dp"
android:layout_gravity="center_horizontal"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
android:id="@+id/radiogroup_answer"
layout="@layout/radiogroup_answer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/question_tv" />
<include
android:id="@+id/hint"
layout="@layout/hint"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/next_question"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/radiogroup_answer"
app:layout_constraintVertical_bias="0.050000012" />
<include
android:id="@+id/hint_button"
layout="@layout/hint_button"
android:layout_width="340dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/radiogroup_answer"
app:layout_constraintVertical_bias="1.0"
app:layout_dodgeInsetEdges="top"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<include
android:id="@+id/next_question"
layout="@layout/next_question_button"
android:layout_width="@dimen/next_question_width"
android:layout_height="@dimen/next_question_height"
android:layout_gravity="center_horizontal"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="16dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.v4.widget.NestedScrollView>
<ImageView
android:id="@+id/expanded_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:clickable="true"
android:focusable="true"
android:scaleType="fitCenter"
android:visibility="invisible"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_dodgeInsetEdges="top" />
Тут две проблемы : 1) во корневом FrameLayout лежит ImageView, по клику этот ImageView становится видимым, маштабируется, но находится не по середине, он отступает вниз ровно на значение высоты Toolbar . 2) В ConstraintLayout есть @+id/hint_button он должен размещаться внизу экрана. Его видно если Toolbar убрать с экрана, а если его опустить он уходит за экран. А я хочу сделать его поведение таким, чтобы он оставался на экране. Но на мои попытки работать с app:layout_dodgeInsetEdges="top" не успешны, реакции вообще никакой не вижу