Skip to content

Release Notes for v0.5.0

Tonic Artos edited this page Mar 20, 2015 · 9 revisions

This document is a work in progress. It will be completed with the v0.5.0 release.

Release notes for v0.5.0

Version 5 is becoming a major release with many far reaching changes.This document will incrementally include the changes as they are made, and will be finalised when the release is published.

Changes to Layout Parameters and Attributes.

The section layout manager no longer needs to be referenced on all items, SuperSLiM only looks for it on the first item of each section.

XML attributes

slm_section_sectionManagerslm_section_layoutManager.
Change made to scan better.

slm_section_headerMarginStartslm_section_marginStart
slm_section_headerMarginEndslm_section_marginEnd
This is a clarification of what these settings actually do. They are not margins for the header, but for the entire section, though headers do have special interaction with the section margins.

Removed slm_section_firstPosition
This is no longer needed because the section start positions are now provided directly by the adapter.

Removed slm_isHeader
This is no longer needed because whether an item is a header is now determined from the sections configuration.

slm_headerDisplay
The behaviour of the flags for this attribute has been changed slightly. The absence of inline, start, and end, indicates the first section item is not a header. Inline is now the same value as start|end.

Caveats

If you are writing your own SLM, custom XML attributes for SLMs can only be read if slm_section_layoutManager is set. This also applies to the GridSLM too. To be clear, this isn't a significant issue because section configuration is only loaded from the first item in the section, where slm_section_layoutManager should be set. This is only an issue if your custom layout wants to add new behaviours to section items which are configurable through XML attributes.

LayoutParams

For the first item in a section, you can declare subsections by adding a list of positions for the start of each subsection:

void setSubsections(List<Integer> subsectionFirstPositions);

Changes to SLM API

LayoutHelper

SLMs no longer interact directly with the LayoutManager. A LayoutHelper is provides a virtual layout space so you don't have to worry about margins, headers or interactions with the greater layout.

Subsections

SuperSLiM also now has built in support for subsections. Header handling has moved out of the LayoutManager into a SLM wrapper which is transparently applied to all SLMs. This means you don't have to worry about implementing header logic for subsections. The SectionData record object also loads subsection configuration automatically. If your SLM has subsections, fillSubsections is called instead of the usual fill method. Helper methods are provided to make it easier to navigate past subsection

New features

Item decorations

An implementation of ItemDecoration is now available. With it you can easily add borders, underlines, padding, or anything else you fancy around your items and headers. See the [documentation]{Using the Item Decorator} on how to use it.

Subsections

You can now nest sections inside other sections.

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