Ranjan101 / RecycleView-StickyHeaders

Easily add Sticky Headers to your RecyclerView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Download Build Status Android Arsenal

StickyHeaders

Easily add Sticky Headers to your RecyclerView

###Setup Implement StickyHeaderHandler in your Presenter/Activity or whatever class has access to your RecyclerView adapter dataset

Make sure the parent of the RecyclerView is a FrameLayout or CoordinatorLayout (this will be verified at Runtime)

Instantiate a StickyLayoutManager and set that as the LayoutManager for your RecyclerView.

For items in your dataset that you want to act as sticky headers, implement the marker interface StickyHeader.

That's it! See the example app for more in depth details.

StickyHeaders

Add to your Gradle dependencies (Check badge at top for latest version):

buildscript {
    repositories {
        jcenter()
    }
}

dependencies {
    compile 'com.brandongogetap:stickyheaders:x.y.z'
}

License

Copyright 2016 Brandon Gogetap

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Easily add Sticky Headers to your RecyclerView

License:Apache License 2.0


Languages

Language:Java 100.0%