Sticky headers was one of the first big requests we said no to. Back in the day a lot of people asked for it but we always shot it down because it was too hard to implement on top of our Swing inspired lists. This predated our Container improvement, InfiniteContainer and InfiniteScrollAdapter.
While our preference for lists has waned we never got around to show how easy it is to do sticky headers with
Container until last week when Chen released the sticky headers demo.
It’s a pretty basic demo and relatively simple at that but that’s exactly the point. Codename One is flexible enough to do pretty much anything you want especially if you don’t lock yourself into a rather restrictive component like
Check out a live demo to the right here…
You can see the full source for the demo here.
Chen chose to implement this on top of the glass pane which provides some capabilities and control over graphics, you could also use the layered pane or a
LayeredLayout to achieve similar effects as well.