GithubHelp home page GithubHelp logo

Nested Sticky Headers about superslim HOT 7 CLOSED

tonicartos avatar tonicartos commented on July 18, 2024
Nested Sticky Headers

from superslim.

Comments (7)

TonicArtos avatar TonicArtos commented on July 18, 2024

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.

TonicArtos avatar TonicArtos commented on July 18, 2024

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.

PatrickDattilio avatar PatrickDattilio commented on July 18, 2024

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.

TonicArtos avatar TonicArtos commented on July 18, 2024

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.

TonicArtos avatar TonicArtos commented on July 18, 2024

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.

jjhesk avatar jjhesk commented on July 18, 2024

+1

from superslim.

TonicArtos avatar TonicArtos commented on July 18, 2024

After all this time. Almost done in version5. Tracked on #192.

from superslim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.