CollapsingToolbarLayout没有滚动平滑

时间:2016-03-16 06:17:32

标签: android android-coordinatorlayout

我是CollapsingToolbarLayout的新手,当我滚动我的内容时没有顺利滚动任何一个请帮助我错误的地方在我的布局下面,当我scrooll up它我的布局没有滚动顺利

 <android.support.design.widget.AppBarLayout android:layout_height="wrap_content"
    android:layout_width="match_parent" android:theme="@style/AppTheme.AppBarOverlay">

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/collapsing_toolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"
        android:fitsSystemWindows="true"
        app:contentScrim="?attr/colorPrimary"
        app:expandedTitleMarginStart="48dp"
        app:expandedTitleMarginEnd="64dp" >

        <ImageView
            android:id="@+id/fulldec_image"
            android:layout_width="match_parent"
            android:layout_height="350dp"
            android:scaleType="fitXY"
            android:fitsSystemWindows="true"
            app:layout_collapseMode="parallax"

            />




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

<android.support.v4.widget.NestedScrollView
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFF"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    >
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="170dp"
            android:layout_gravity="bottom">
            <TextView
                android:id="@+id/fulldectext"
                android:layout_width="match_parent"
                android:layout_height="160dp"
                android:layout_gravity="center"

                android:text="The problem is not the problem. The problem is your attitude about the problem"
                android:textSize="25sp"
                android:lineSpacingMultiplier="1.2"
                android:gravity="center"

                />




        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:id="@+id/fullde_descriptiontect"

                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_marginRight="10dp"
                android:layout_marginLeft="10dp"
                android:text="Hello"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </LinearLayout>
        <View
            android:layout_width="match_parent"
            android:layout_height="20dp"/>
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="130dp"
        android:paddingLeft="30dp"
        android:background="#FFFFFF"
        android:orientation="vertical">
        <TextView
            android:layout_marginLeft="10dp"
            android:gravity="center_vertical"
            android:text="More Links"
            android:layout_width="fill_parent"
            android:layout_height="35dp"
            android:textStyle="bold"
            android:textSize="15dp"/>

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="match_parent">
            <TextView
                android:id="@+id/text_one_t"
                android:gravity="center"
                android:layout_marginTop="10dp"
                android:textSize="20dp"

                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>

            <TextView
                android:id="@+id/text_two_t
                android:layout_marginTop="10dp"

                android:textSize="20dp"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"/>
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>
</android.support.v4.widget.NestedScrollView>

0 个答案:

没有答案