It has been a busy time for development on SuperSLiM. Moving forward, in the next few weeks, I'd like to get to a stage where all the basics are complete. If you can help me with that, I'd really appreciate it. Just as little as telling me how you are using SuperSLiM is helpful, but also, I would love it if you are able to file any issues you encounter, and contribute any code.
About the Google+ Community. I am hoping it can become a useful forum to engage with you, the users, and for you to discuss how you are using SuperSLiM. It would be fantastic if you can post any projects you are using SuperSLiM in, or interesting things or ideas you have for SuperSLiM. If you have any code snippets you want to discuss, just host it in a gist and link it in a post.
That's enough of that. Here is a breakdown of recent development.
The flexible approach.
About the Google+ Community. I am hoping it can become a useful forum to engage with you, the users, and for you to discuss how you are using SuperSLiM. It would be fantastic if you can post any projects you are using SuperSLiM in, or interesting things or ideas you have for SuperSLiM. If you have any code snippets you want to discuss, just host it in a gist and link it in a post.
That's enough of that. Here is a breakdown of recent development.
Releases
A few early releases have been made to Maven Central. The latest release is v0.2.1 and it should be indexed in the next few hours. v0.2.1 is a minor feature improvement over 0.1, but has breaking changes. Fortunately, it should be obvious on how to fix those breaks, and there is plenty of documentation in the wiki and I've included some notes below.
Project page →
This week the project page was updated to be a little more pretty and a lot more informative. It isn't really a go to location, but it is nice to keep it up to date.Wiki →
The wiki has continued to be maintained. A getting started guide has been added as well.
Roadmap →
After the recent focus on important fixes and minor features, development will be returning to following the roadmap. If you think there is something SuperSLiM needs, please open an issue for discussion or post to the community.Code
Development has continued with a number of bugs being fixed and the completion of a number of roadmap goals. Thank you very much to those who have submitted issues.
Summary of Changes
Bug fixes
A number of bugs have been fixed. Performance should be improved, particularly for item views with images or complex layouts. GridSectionLayoutManager has seen quite a few fixes.
RTL Language support
As mentioned before, RTL languages should now be well supported. If you encounter any issues please do not hesitate to raise an issue, or post to the community if you are not sure.
Find visible view methods
A few methods found in LinearLayoutManager that are reportedly required for infinite scrolling implementations have been added.
Simplification of API
The API for registering your SectionLayoutManagers with the LayoutManager has been simplified. In past versions a factory was used to instantiate section layouts for each section. Instead, this has changed to registering a layout against an id. The layout id is referenced in your view's layout parameters (or xml attributes).
Registering your section layouts
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);
Referencing the section layout for your views
XML
This will result in a fixed layout for any views inflated from this.
This will result in a fixed layout for any views inflated from this.
<?xml version="1.0" encoding="utf-8"?>
<TextView
android:id="@+id/text"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textDirection="locale"
app:slm_section_layoutId="0"
tools:text="Text Line Item"
/>
Programmatic (in your Adapter implementation)The flexible approach.
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
final LineItem item = mItems.get(position);
holder.bindItem(item.text);
final LayoutParams params = holder.getLayoutParams();
params.layoutId = item.layoutId;
params.setFirstPosition(item.sectionFirstPosition);
holder.setLayoutParams(params);
}
Comments
Post a Comment