Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can it work with AppBarLayout? #2

Open
tinlok228 opened this issue Feb 27, 2017 · 0 comments
Open

How can it work with AppBarLayout? #2

tinlok228 opened this issue Feb 27, 2017 · 0 comments

Comments

@tinlok228
Copy link

tinlok228 commented Feb 27, 2017

I want let SimpleRefreshHeader above the AppBarLayout, or at it's top like this?
http://imgur.com/a/j2f5G
How can I do?
Thank you.

<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <!-- ViewPager in FrameLayout -->
    <include layout="@layout/frame_layout_index_header_banner"/>

    <!-- Search Bar -->
    <android.support.design.widget.CollapsingToolbarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:layout_collapseMode="pin">

            <ImageView
                android:id="@+id/image_view_search"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:background="@drawable/shape_yellowbg"
                android:src="@drawable/search_new" />

            <TextView
                android:id="@+id/text_view_search"
                android:layout_width="match_parent"
                android:layout_height="30dp"
                android:background="@drawable/shape_search"
                android:drawableLeft="@drawable/search_new"
                android:gravity="center_vertical"
                android:text="@string/please_input_product_name"
                android:textColor="@color/black3"
                android:textSize="12sp" />
        </LinearLayout>

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

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

<com.loopeer.springheader.SimpleRefreshHeader
    android:id="@+id/simple_refresh_header"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:background="#cccccc"/>

<android.support.v4.widget.NestedScrollView
    android:id="@+id/nested_scroll_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">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:src="@drawable/is_going_bg"/>

    </LinearLayout>

</android.support.v4.widget.NestedScrollView>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant