Skip to content

Header layout managers

Tonic Artos edited this page May 17, 2016 · 1 revision

Header layout managers are invisible to the user and to SLM implementers. They are inserted invisibly into the layout mechanism before a Section's Slm operates.

Hlms have additional constraints in how they work. They must ensure that headers are positioned immediately after the section's content items in the view hierarchy. This is due to draw op ordering in earlier versions of Android, as headers must be drawn after (read: on top of) content items onto the screen. For Lollipop and later this is an unnecessary complication as elevation solves this problem. Num views in layout state is used as a part of tracking where the header is within the view hierarchy. This effects fill and trim ops greatly, and only layout insofar as it needs to correctly record the value.

StickyHlm

A Hlm which implements sticky. A sticky header has a physical size which means the total real size of a section is the height of the content plus the height of the header. The header continues to display until the content has scrolled away completely, it never extends below the content, only to the foot of the content. The non-sticky location of the header is above the content.

FloatingHlm

Implements the floating header. The floating header is very similar to the sticky header except it has no physical size, it never extends above the content area, instead overlaying the content. It also behaves in the sticky manner in the same way as the sticky header.

GutterHlm

A HLM which implements headers which are sticky and fit within the section's header gutter. The header is placed to the left or right of the content and may adjust to fit the gutter width or resize the gutter to fit depending on configuration.

Versioned Pages

0.4

[Getting Started](Getting started with version 0.4)
[User's Guide](User's guide for version 0.4)

version5 (WIP)

User documentation
[Basic usage](A simple tutorial)
[Advanced usage](All the cool things)
[SuperSLiM and RxJava](Using SuperSLiM with RxJava)

Developers documentation
Glossary
[The section graph](The section graph)
[Tracking data changes](Tracking data changes)
[Configuration transformations](Configuration transformations)
[Layout helpers](Layout helpers)
[Section configuration](Section configuration)
[Section state](Section state)
[Section layout managers](Section layout managers)
[Header layout managers](Header layout managers)

Clone this wiki locally