android - CoordinatorLayout / CollapsingToolbarLayout spacing issues -
i'm having issues implementing collapsingtoolbarlayout in app in conjunction recyclerview. have setup , working (compared few different sources - including cheesesquare setup) - i'm having issues spacing near bottom of layout (1st photo & 3rd photo) hoping might able with.
images found here: http://imgur.com/a/w3lb8
it seems few others have had problem, , answers did not solve mine - atleast:
coordinatorlayout leaves empty space @ bottom after scrolling
whitespace below coordinatorlayout in drawerlayout
i tried adding android:layout_gravity="fill_vertical" nestedscrollview / recyclerview suggested, , while seems (mostly) fix it, hides 1 & 1/3 of lowest views (looking @ views through hierarchy viewer - photo 4). i'm sure there's solution this, haven't been able figure out yet. assistance appreciated.
activity layout file:
<android.support.design.widget.coordinatorlayout android:id="@+id/coordinator_layout" 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/app_bar_layout" android:layout_width="match_parent" android:layout_height="240dp" 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:expandedtitletextappearance="@style/gasmonitortheme.actionbar.titletextappearance" app:layout_scrollflags="scroll|exituntilcollapsed"> <imageview android:id="@+id/toolbar_imageview" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" android:scaletype="centercrop" android:transitionname="car_image" app:layout_collapsemode="parallax" /> <android.support.v7.widget.toolbar android:id="@+id/toolbar_actionbar" 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:layout_gravity="fill_vertical" android:id="@+id/fragment_recyclerview" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <android.support.design.widget.floatingactionbutton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/default_side_padding" android:clickable="true" android:src="@drawable/ic_add" android:tint="@color/white" app:layout_anchor="@id/coordinator_layout" app:layout_anchorgravity="bottom|right|end" /> </android.support.design.widget.coordinatorlayout> i've gone through , simplified activity match of cheesesquare app (trying find why mine doing this), aside adapter pulling list. i've tested , seen same issue on api 22 & 23.
Comments
Post a Comment