Skip to content

Layout helpers

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

The layout helper acts as the interface between the layout manager/recycler view and the Slms. This design was chosen to isolate layout from the complexities of both the nested layout feature and configuration differences offered by SuperSLiM.

Virtual coordinates

Section layout managers work in their own virtual coordinate space that is transformed into the window coordinates. As such, section layout managers behave as though they are always operating in a vertical scrolling, top-to-bottom, left-to-right coordinate space. The width of the space is defined by the parent, and may have an invisible offset. Every call to layout or query an item has its coordinate values adjusted transparently. As such the Slm is completely isolated from the particulars of any layout it is nested within, with the exception of changes to the finite dimensions of the layout space.

Layout configurations

SuperSLiM supports a considerable number of configurations, including localisation differences, layout direction changes, and different scroll orientations. These are each implemented as a layer of configuration helpers that sit between the layout manager and the layout helper. Each configuration helper is actually a kind of layout helper that implements the subset of read write operations. The read write operations inside the transparent transform the coordinates involved in the same manner as the regular layout helper. Also, this means that each configuration helper can be composed together to allow any combination of layout configuration options.

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