-
Notifications
You must be signed in to change notification settings - Fork 295
Attributes and Parameters Reference
SuperSLiM uses layout parameters to load per view data about the views coming from the RecyclerView adapter. When you bind your data to your ViewBinders in your adapter your can programmatically use the SuperSLiM LayoutParams, or use XML views with the attributes appropriately set.
integer
Adapter position of the first view in the section. This is often a header view, and is the only valid location for a header view in a section.
A MissingFirstPositionException
will be thrown if a view does not have this attribute or LayoutParameter
set.
integer|string Section layout manager for the section to which this view belongs. If a string value is set then the matching registered custom SLM will be used.
To use a built-in SLM the following values can be used.
LinearSLM.ID
GridSLM.ID
A MissingLayoutException
will be thrown if the first view of a section does not have this attribute or LayoutParameter
set.
An UnknownSectionLayoutException
will be thrown if an unknown integer is passed, or if the string value does not match a registered custom SLM.
boolean
Indicate if the view is a header. If it is a header it must be the first view of its section.
default value = false
flag
Configuration for how to display headers.
default value =
inline|sticky
flags
inline - Position header above the section.
start - Position the header to the start side of the section (for left to right languages this is the left side).
end - Position the header to the end side of the section.
overlay - Display the header over the top of the section contents.
sticky - Sticky the header to the top of the screen if any part of its section is displayed and its normal position would place it off the screen.
enum | dimension
The header start margin is the area allotted only for headers on the start edge of the section. A start aligned header will align to the section edge of the start margin and overflow off the start side of the RecyclerView if it is too large.
default value =
match_header
enums
match_header - Match the margin size to the header size.
dimension value
Some dimension value such as 32dips.
enum | dimension
The header end margin is the area allotted only for headers on the end edge of the section. An end aligned header will align to the section edge of the header margin and overflow off the end side of the RecyclerView if it is too large.
default value =
match_header
enums
match_header - Match the margin size to the header size.
dimension value
Some dimension value such as 32dips.
[Getting Started](Getting started with version 0.4)
[User's Guide](User's guide for version 0.4)
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)