i trying make collapsingtoolbarlayout. have implemented that. have parallax image in collapsingtoolbarlayout. outside collapsingtoolbarlayout have nestedscrollview 3 cards. when scroll cards, collapsingtoolbarlayout collapses show toolbar , cards move top below action bar. not scrolling beyond action bar. result of is, not being able view contents of third card.
am missing ? here code
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/coordinatorlayout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true"> <android.support.design.widget.appbarlayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="325dp" android:fitssystemwindows="true" android:theme="@style/base.themeoverlay.appcompat.dark"> <android.support.design.widget.collapsingtoolbarlayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" app:contentscrim="?attr/colorprimary" app:expandedtitlemarginend="64dp" app:expandedtitlemarginstart="48dp" app:layout_scrollflags="scroll|exituntilcollapsed"> <imageview android:id="@+id/artist_image_profile_page" android:layout_width="match_parent" android:layout_height="300dp" android:src="@mipmap/ic_default_artist" app:layout_collapsemode="parallax" app:layout_scrollflags="scroll|enteralways|enteralwayscollapsed" android:clickable="true" android:transitionname="selectedartistimage" android:scaletype="centercrop" /> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" app:layout_scrollflags="scroll|enteralways"/> </android.support.design.widget.collapsingtoolbarlayout> </android.support.design.widget.appbarlayout> <android.support.v4.widget.nestedscrollview android:id="@+id/scroll_card_view" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.cardview android:id="@+id/card_video" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" app:cardbackgroundcolor="@color/background_light_color"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="10dp"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/video" android:textsize="18sp" android:textcolor="@color/primary_text_dark_color" android:textappearance="@style/textappearance.appcompat.title" /> <relativelayout android:layout_width="match_parent" android:layout_height="300dp" android:layout_margintop="10dp" android:background="@color/background_dark_color"></relativelayout> </linearlayout> </android.support.v7.widget.cardview> <android.support.v7.widget.cardview android:id="@+id/card_releases" android:layout_width="match_parent" android:layout_height="100dp" android:layout_margin="5dp" app:cardbackgroundcolor="@color/background_light_color"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="10dp"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/releases" android:textsize="18sp" android:textcolor="@color/primary_text_dark_color" android:textappearance="@style/textappearance.appcompat.title" /> </linearlayout> </android.support.v7.widget.cardview> <android.support.v7.widget.cardview android:id="@+id/card_biography" android:layout_width="match_parent" android:layout_height="100dp" android:layout_margin="5dp" app:cardbackgroundcolor="@color/background_light_color"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="10dp"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/biography" android:textsize="18sp" android:textcolor="@color/primary_text_dark_color" android:textappearance="@style/textappearance.appcompat.title" /> <textview android:id="@+id/artist_biography" android:layout_width="match_parent" android:layout_height="wrap_content" android:textsize="16sp" android:text="@string/test" android:layout_margintop="5dp" android:textcolor="@color/secondary_text_color"/> </linearlayout> </android.support.v7.widget.cardview> </linearlayout> </android.support.v4.widget.nestedscrollview> ## heading ##</android.support.design.widget.coordinatorlayout>
the problem have specified layout_height last 2 cardview (android:layout_height="100dp"). replace "wrap_content" , should work smoothly.
Comments
Post a Comment