StickyHeaders


Source link: https://github.com/ShamylZakariya/StickyHeaders

StickyHeaders

Adapter and LayoutManager for Android RecyclerView which enables sticky header positioning.


Download

minSdkVersion: 11

compile 'org.zakariya.stickyheaders:stickyheaders:0.7.6' 

StickyHeaders are section headers in a recyclerview which are positioned "stickily" to the top of the scrollview during scrolling. A common use-case is an address book where the list of people's last names are grouped into sections by the first letter of the last name, and the header for each section shows that letter.

For example:

StickyHeaders also supports a callback ( org.zakariya.stickyheaders.StickyHeaderLayoutManager.HeaderPositionChangedCallback) when a header becomes "sticky" or returns to normal positioning. For example, it is used here to set the elevation on the header to cast a subtle drop shadow when the header is in sticky position.

For example:

Usage

To use StickyHeaders, you need to do two things.

  1. Implement an adapter by subclassing org.zakariya.stickyheaders.SectioningAdapter
  2. Assign a org.zakariya.stickyheaders.StickyHeaderLayoutManager to your recyclerview.
  3. When handling modifications to your dataset, never call the RecyclerView.Adapter::notify* methods, instead, call the corresponding methods in org.zakariya.stickyheaders.SectioningAdapter::notifySection*. The reason for this is SectioningAdapter maintains internal state, and the notifySection* methods are tailored for adding and removing sections, adding and removing items from sections, etc.

Also

You can use sectioning adapter with a normal android.support.v7.widget.LinearLayoutManager. it works fine, and could be a good way to implement a list like at the root of Android's Settings app.

Resources

A small library including an example app which uses the "floating label" pattern to show form validation.

RecyclerView adapter classes for managing multiple view types.

An Android grid lock screen view with a callback interface. It is very simple to use.

Kotlin library for Android with useful extensions to eliminate boilerplate code in Android SDK and focus on productivity.

SoBitmap is a bitmap decode library for Android. Developers can customize max size of memory, max memory size for output bitmap and picture size, then SoBitmap will do its best for producing the right bitmap.

ADP

Android Distribution Platform (ADP) is a fullstack framework for storing, distributing and installing versionized apk files based (mostly for internal team or roll-back purposes) on each CI git commit.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes