tumblr / Bookends

A UI widget for adding headers and footers to RecyclerView
539 stars 62 forks source link

Issue when using coordinator layout. #9

Open rishabhsri20 opened 9 years ago

rishabhsri20 commented 9 years ago

When I am using this with coordinator layout and the keyboard is opened the whole UI gets disturbed.

KevinTCoughlin commented 9 years ago

@rishabhsri20 commented 5 hours ago

Would you be able to post your layout file or at least a video / gif (screen cap)? We haven't used this with a CoordinatorLayout yet. I'd like to try to recreate your environment to best debug.

rishabhsri20 commented 9 years ago

This was the xml:

<?xml version="1.0" encoding="utf-8"?> <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:background="@android:color/white">

<android.support.v7.widget.RecyclerView
    android:id="@+id/frag_order_recycler"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="15dp"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="250dp">

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/frag_order_colllay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:contentScrim="@android:color/white"
        app:layout_scrollFlags="scroll|exitUntilCollapsed">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/white">

            <TextView
                android:id="@+id/frag_order_totalcost"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_above="@+id/frag_order_totalitems"
                android:gravity="left"
                android:paddingLeft="10dp"
                android:textColor="@color/darkgreen"
                android:textSize="28sp"/>

            <TextView

                android:id="@+id/frag_order_totalitems"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:gravity="left"
                android:paddingLeft="10dp"
                android:text="Cappuccino"
                android:textColor="@color/darkgreen"/>

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:background="@drawable/profile"/>

        </RelativeLayout>

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?actionBarSize"
            app:layout_collapseMode="pin"/>
    </android.support.design.widget.CollapsingToolbarLayout>

</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>

and I added the header and footer according to the sample.

TakWolf commented 9 years ago

I have the same problem.