Just a quick update on version5. Padding is almost finished, and with it scrolling. However, I am away from civilisation for about a week, so nothing will happen until I am back. After that, all that remains for milestone 2 is finishing a couple more header layouts and persisting state between configuration changes.

Hi there, I have been very quiet for a while. Sorry. As you may know, I develop on SuperSLiM in my free time, where I can. Also, I have been dealing with health issues for a few years now. This has significantly impacted the time I've been able to put into the library for a while now. Anyway, all that aside, here is a little about the development of SuperSLiM lately.

After I last pushed to GitHub I discovered things were broken with support lib 23.2.0. Things seemed better with 23.3.0, but after some further investigation there were still problems. It was all to do with how recycler view manages it data change notifications to the layout manager. This might be a pain point again in the future, there isn't much I can do about it except fork recycler view, or convince the guys over there to take a patch to bundle some extra data with the data change notifications. For now however, it is working... again. While looking into this I also ran into some additional issues on the way, and ended out writing more tests. I should have done that before.

Okay, on to new development.

I've been working on getting scrolling working for a while, but it has been a real nightmare. To explain, I'll have to detail a little about the new architecture. With version5, layouts are separated into section layout managers (SLMs), which are extremely isolated modules. They work in a virtual space, and can only act on two things, a layout helper, and the section data. Some SLMs were semi-privileged to implement headers (HLMs). The layout helper is what makes it all work. It abstracts coordinates, interactions with recycler view and its various abstractions, and well, pretty much everything. Through the layout helper I have done a lot of things like performing coordinate transformations to implement vertical and horizontal orientations, and the localisation switcheroo. It all works invisibly from the actual SLM implementations, which is highly ideal. As far as a SLM or HLM knows, the recycler view is always a vertically scrolling space. This makes writing layouts a breeze, well, relatively so. It also turns out to make scrolling really hard, well, to get it all coordinated that is. Every time I figure out more, realise a mistake and go over it again, it all seems painfully obvious. Which is a good sign.

So, to the topic. Scrolling. In my last pass I worked out all the cases that can happen. I've added additional state tracking between layout and scroll events. I peeled apart layout state from SLMs and HLMs. HLMs have been demoted to a kind of SLM that gets inserted invisibly into every section; because they just might have headers. Scrolling is turned into a fill for the leading edge, and a trim for the trailing edge. Each SLM has to call the fills and trims on the visible sections of the graph, which is evaluated from the stored layout state, and not pulled from the view hierarchy like in previous versions! Anyway, it is a complex dance of checking state and updating state with each call down the graph, and then possible additional calls to layout more items within the fill area.

I am very excited to get it all working. I just need more time to put into it!

---

Oh yes, I also moved accounts, you shouldn't notice much effect. You can tell the two apart because I blacked out the old account's profile image. Why did I do this? Reasons.

Hi, I tried to add an ItemDecoration to my RecyclerView tuned with SuperSLiM but I wouldn't like to display dividers below sections. Can you give me a hint on how to do that?

Thanks in advance!

I am implementing Search View while using SuperSlim , running into troubles with NPE getAnchorEnd()

Hooray, I've completed Milestone 1. If you'd like to, you can check it out on the version5 branch - https://github.com/TonicArtos/SuperSLiM/tree/version5.

Here is a quick blurb about version 5. I'll be making a proper blog post about it soon.

About version 5

Version 5 is a new implementation of SuperSLiM that works using an internal graph of your data set. This solves many problems with the old design. In Milestone 1, version 5 renders your data set as a graph of sections and items. It supports horizontal and vertical configurations, in addition to the other common layout configurations for RecyclerView. Oh yes, it also works with RecyclerView's predictive animations. The design is also simpler to use and easier to extend. However, right now that actual layout is incomplete as it does not scroll.

Milestone 2 is focused on bringing the library up to a usable point. It will add scrolling, a complete linear section layout, a complete set of header layouts, and a few other things. There are a few more planned milestones too. Please see the project plan (https://trello.com/b/g3Wctuey) for more information.

Post has attachment
Blog post over at tonicartos.com. There is a little bit more information about version 5 than was posted here earlier.

Well, here it is almost Christmas and the years end is near so… happy holidays folks!

Post has shared content
SuperSLiM 0.5 is almost here. I am so very excited to get this finished. There is a huge list of improvements that the new version already has, supporting item changes is one, not doing strange things with your views is another, though right now it doesn't scroll, but I am working on that.

Other things that are known to work, or are written and in testing:
- Reverse layout
- Stack from end
- Horizontal layout
- Vertical layout
- RTL layout direction
- LTR layout direction
- Various header configurations
- Predictive animations
- XML loading of the layout manager
- An adapter with a graph interface
- Loose coupling to the adapter. You don't have to use mine, you only need to implement the adapter contract interface on your adapter.

There is already an earlier version of the new adapter in the version5 branch on GitHub. From it you can see how SuperSLiM will work when version5 is done.

I'll be pushing the latest updates as soon as my Internet connection woes are sorted. On that note, they have promised an interim solution! It sucks.

Post has shared content

Hello Tonic. I really like you library,it helped me allot. I wanted to use the Sticky header watcher. How can I do that ?

Hi Tonic. I added your lib some week ago. Now I want to implement a fast scrool. Before to write my personal layout, I saw this lib "https://github.com/danoz73/RecyclerViewFastScroller". Using this lib I have the error: " java.lang.ClassCastException: com.tonicartos.superslim.LayoutManager cannot be cast to android.support.v7.widget.LinearLayoutManager".

I tried to solve myself, but the log don' t give me the bad line, so I dont know where put changed
Wait while more posts are being loaded