Comments (7)
I'm guessing you mean to have content items be sticky too. I haven't explained it in the documentation yet, but headers are handled by the LayoutManager and content items by the SectionLayoutManagers (SLM). If you want to have content items be sticky, it would have to be added to a SectionLayoutManager implementation. I don't think this behaviour belongs in the default linear, grid, and staggered grid layout implementations, but feel free to write your own.
However, if you mean having subsections with sticky subheaders. It is intended to be possible to write a SLM which nests others. I actually have plans to do this for one of my projects.
from superslim.
I see your .gif now. This could definitely be satisfied by either approach. I think I'll experiment with both ways myself and see how well the current design supports them. However, this will only happen after milestone 5 as I want to get the staggered grid layout done asap.
from superslim.
I think having subsections/ nested sections would work perfectly for this. The navBar would be the section header.it would have a sub/nested sections, each with their own header and item.
from superslim.
Okay, so this has gotten pulled into the next big version. The interface for declaring subsections is like this:
class LayoutParams … {
…
public void setSubsections(List<Integer> sectionFirstPositions) { … }
…
}
This is a mirror of the same interface that is coming for top level section declaration, except this is on the configuring section item (first item in section) instead of in the adapter.
Changes to the subsections will be tracked with add and remove actions. However, I am still working out how the move action should be handled with relation to section management. The difficulty there is when an item should be moved from one section to another. A decision on that will dictate how the update action is handled.
from superslim.
Okay, this might be changing a little more. I am still investigating this but, it looks like I'll making section declaration a proper directed graph. This means sections and subsections will be declared up front. This will simplify some section management for me, but also allow sections that contain only subsections and no header, which was a sticking point with the previous design.
While LayoutManager will manage the section graph from then on, but it will still have to pull the full graph at times. So it is probably wise to keep the graph up to date with data set changes.
The only difficulty really is adding and removing sections. These events are definitely associated with the notify actions, but I am not yet sure what will be a good interface to complement it.
from superslim.
+1
from superslim.
After all this time. Almost done in version5. Tracked on #192.
from superslim.
Related Issues (20)
- Flexbox layout
- Dynamic sticky content
- Built in elevation change for sticky content.
- Infinite scroll
- Collapsible/expandable sections
- Sticky footers weirdly wobble on horizontal scroll. HOT 1
- Toggling collapsible sections loses items.
- Prepare milestone 5 release
- Update Readme.md
- On layout a sticky footer always sits above sticky inset (section state inset parameter).
- Sticky footer HOT 2
- RecycleView scrolls over sticky header
- Crash On RecyclerView Refresh
- Does SuperSLiM supports sub headers ? HOT 10
- Mocking framework
- i cannot build the project
- NPE at LayoutManager#onItemsUpdated
- Androidx HOT 1
- Is this covered by the Apache 2.0 License?
- Scrolling issue with Sticky Headers on
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superslim.