滚动到包含 NestedScrollView 和 AppBarLayout 的 CoordinatorLayout 的底部

Fer*_*Fer 6 android parallax android-coordinatorlayout android-appbarlayout nestedscrollview

有没有办法(以编程方式或通过 xml)滚动到以下 CoordinatorLayout 的底部(见下文),以便在显示屏幕时可以看到 NestedScrollView 中的最后一个元素?

附件是显示的实际屏幕和想要显示的屏幕。您可以注意到比较两个图像,向下滚动时,图像具有视差效果。

我希望当屏幕加载时,NestedScrollView 底部的按钮(仅在第二张图片中可见)是可见的......只需要一点点自动滚动!

任何建议将不胜感激。

当前显示的初始屏幕:

当前显示的初始屏幕

所需的初始屏幕:

所需的初始屏幕

布局的xml:

<android.support.design.widget.CoordinatorLayout
    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.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.design.widget.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:background="#000"
                android:paddingEnd="40dp"
                android:paddingStart="40dp"
                android:paddingTop="30dp"
                android:src="@drawable/image"
                app:layout_collapseMode="parallax"
                tools:ignore="ContentDescription"/>

        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.widget.NestedScrollView
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/black"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:focusableInTouchMode="true"
            android:orientation="vertical"
            android:paddingBottom="30dp"
            android:paddingTop="30dp">

            <TextView
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/register_text_1"/>

            <EditText
                android:id="@+id/param1"
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/param1"
                android:textColorHint="#fff"/>

            <EditText
                android:id="@+id/param2"
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/param2"
                android:textColorHint="#fff"/>

            <EditText
                android:id="@+id/param3"
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/param3"
                android:textColorHint="#fff"/>

            <EditText
                android:id="@+id/param4"
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/param4"
                android:textColorHint="#fff"/>

            <EditText
                android:id="@+id/param5"
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/param5"
                android:textColorHint="#fff"/>

            <EditText
                android:id="@+id/param6"
                style="@style/register_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/param6"
                android:textColorHint="#fff"/>

            <TextView
                android:id="@+id/accept"
                style="@style/button"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="30dp"
                android:minWidth="100dp"
                android:text="@string/button_accept"/>

        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)