SuperSLiM has seen lots of development this week, though a few less releases this time. Much of the work has been to iron out issues in the layout and scrolling code, culminating with a complete overhaul of it all. Now performance is much better and you don't get the weird problems that cropped up in v0.3. Oh yeah, and you still have a nice smooth scroll indicator.
Changes
This release has big changes to initialisation. Old code like:
LayoutManager lm = new LayoutManager();
SectionLayoutManager linear =
new LinearSectionLayoutManager(lm);
SectionLayoutManager grid =
new GridSectionLayoutManager(lm, getActivity());
grid.setColumnMinimumWidth((int) getResources()
.getDimension(R.dimen.grid_column_width));
lm.registerSectionLayoutManager(0, linear);
lm.registerSectionLayoutManager(1, grid);
mRecyclerView.setLayoutManager(lm);
is now:
mRecyclerView.setLayoutManager(
new LayoutManager(getActivity());
and in your adapter you can set the section layout manager like so:
params.setSlm(GridSLM.ID);
There are a few more changes, like configuring SLMs through xml, and how I broke your custom layouts :(. Anyway, the User's Guide has been updated to help you along.Looking ahead
While I still consider the library to be experimental, I have started to fee pretty happy about its state. The last outstanding thing is looking into moving as much section configuration to the first section view. Past that, I want to focus on adding new features and layouts.Get it today
Update your build.gradle files to get the latest version.dependencies {
compile 'com.tonicartos:superslim:0.4.0'
}
Comments
Post a Comment