Using cheesesquare - an example of an Android support library , is it possible to make the ImageView title scroll?
<android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/detail_backdrop_height" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:fitsSystemWindows="true"> <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/backdrop" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" android:fitsSystemWindows="true" app:layout_scrollFlags="scroll" app:layout_collapseMode="parallax" /> ... </android.support.design.widget.CollapsingToolbarLayout> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" app:layout_behavior="@string/appbar_scrolling_view_behavior"> ....
Please note that I added the added android:fillViewport="true" to the NestedScrollView , and also added the app:layout_scrollFlags="scroll" to the ImageView , but nothing happens when I try to scroll from the ImageView .
android android-scrollview android-support-library android-design-library collapsingtoolbarlayout
royB
source share