How could I change the starting of animation in CollapsingToolbarLayout? I figured out that animation is controlled by the app:contentScrim
attribute.
But the "alpha" animation is starting too soon. Could I change the animation attributes somehow? I guess by the height so about "200dp".
For example, if I would define <CollapsingToolbarLayout... layout_height="150dp" >
I don't even see the image because it's already hidden by the animation at the beginning. Here is my xml:
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/paralax_tabs_collapse_toolbar"
android:layout_width="match_parent"
android:layout_height="250dp"
android:background="@color/my_action_bar_color"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginStart="10dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView
android:id="@+id/paralax_tabs_header_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax" />
<android.support.v7.widget.Toolbar
android:id="@+id/paralax_tabs_toolbar"
android:layout_width="match_parent"
android:layout_height="104dp"
android:gravity="top"
android:minHeight="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleMarginTop="13dp" />
<android.support.design.widget.TabLayout
android:id="@+id/paralax_tabs_tabs"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom"
android:background="@color/app_tab_backgorund"
app:tabIndicatorColor="@android:color/white"
app:tabIndicatorHeight="5dp"
app:tabMode="scrollable" />
</android.support.design.widget.CollapsingToolbarLayout>