CoordinatorBehaviorExample icon indicating copy to clipboard operation
CoordinatorBehaviorExample copied to clipboard

Also how can we use tablayout with this layout, can you please explain me that...

Open deepeshalways opened this issue 9 years ago • 1 comments

deepeshalways avatar Jul 11 '16 12:07 deepeshalways

Editing my own answer, I've got a much cleaner solution. Just put the TabLayout on top of the NestedScrollView and above the TabLayout put a space of the Toolbar height. After that set the overlap of the NestedScrollView to be the same height as the space and you are set!

During scroll the space is barely visible.

<android.support.v4.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbars="none"
    app:behavior_overlapTop="?attr/actionBarSize"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">


    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <Space
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize" />

        <android.support.design.widget.TabLayout>

HerRomero avatar Oct 06 '16 15:10 HerRomero