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

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

Open
deepeshalways opened this issue Jul 11, 2016 · 1 comment

Comments

@deepeshalways
Copy link

No description provided.

@HerRomero
Copy link

HerRomero commented Oct 6, 2016

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>

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

2 participants