xml - Toolbar spacing issue using Android Design Support Library -
while following liuguangqiang's sample , chris bane's cheesesquare samples android design support library, there seems issue in toolbar spacing, in image.
here activity.xml code:
<android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" 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="192dp" android:fitssystemwindows="true" android:theme="@style/themeoverlay.appcompat.dark.actionbar"> <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/header" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/header" android:fitssystemwindows="true" android:scaletype="centercrop" app:layout_collapsemode="parallax" /> <android.support.v7.widget.toolbar android:id="@+id/anim_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" app:layout_collapsemode="pin" app:popuptheme="@style/themeoverlay.appcompat.light" /> </android.support.design.widget.collapsingtoolbarlayout> </android.support.design.widget.appbarlayout> <android.support.v7.widget.recyclerview android:id="@+id/scrollableview" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <android.support.design.widget.floatingactionbutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:clickable="true" android:src="@drawable/ic_action_add" app:layout_anchor="@+id/appbar" app:layout_anchorgravity="bottom|right|end" /> </android.support.design.widget.coordinatorlayout>
as can see, i've followed chris bane's sample closely. issue exists on lollipop, while works fine on pre lollipop.
anyone experiencing same issue, or know of possible fix?
unfortunately known issue fixed in future release. please check link
in meantime in above link proposed workaround may help. can check it.
Comments
Post a Comment