Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
Update readme, changelog and screenshoots
Browse files Browse the repository at this point in the history
  • Loading branch information
luizgrp committed Sep 24, 2019
1 parent 409d6a1 commit bf653b5
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 8 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 3.0.0 - 07/09/2019

- Remove class `StatelessSection`
- Add class `SectionAdapter`
- Add class `SectionedRecyclerViewAdapterV2Compat`
- Move inner class `EmptyViewHolder` to package `utils`

### SectionedRecyclerViewAdapter class
- Add method `getAdapterForSection`
- Removed `notify*` and `get*Position*` methods
- Remove `EmptyViewHolder` inner class

### SectionAdapter class
- Add `notify*` and `get*Position*` methods from `SectionedRecyclerViewAdapter`

### Section class
- Remove method `onBindContentViewHolder`
- Add overloaded methods `onBind*ViewHolder` with payloads as parameter
- Change `getHeaderViewHolder`, `getFooterViewHolder`, `getLoadingViewHolder`, `getFailedViewHolder` and `getEmptyViewHolder` to throw `UnsupportedOperationException` instead of returning an `EmptyViewHolder` by default

### SectionedRecyclerViewAdapterV2Compat
- Add `notify*` and `get*Position*` removed methods from `SectionedRecyclerViewAdapter`

## 2.1.0 - 09/06/2019

- Set source and target compatibility to Java 8
Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ An Adapter that allows a RecyclerView to be split into Sections with headers and
[![codecov](https://codecov.io/gh/luizgrp/SectionedRecyclerViewAdapter/branch/master/graph/badge.svg)](https://codecov.io/gh/luizgrp/SectionedRecyclerViewAdapter)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-SectionedRecyclerViewAdapter-green.svg?style=true)](https://android-arsenal.com/details/1/3471)

<img src="https://raw.githubusercontent.com/luizgrp/SectionedRecyclerViewAdapter/master/art/sc1.png" width="300" height="533" >
<img src="https://raw.githubusercontent.com/luizgrp/SectionedRecyclerViewAdapter/master/art/sc4.png" width="300" height="533" >
<br><br>
![Linear](art/sc1.png)
![Grid](art/sc4.png)

In addition, each Section can have its state(Loading/Loaded/Failed/Empty) controlled individually.

<img src="https://raw.githubusercontent.com/luizgrp/SectionedRecyclerViewAdapter/master/art/sc2.png" width="300" height="533" >
<img src="https://raw.githubusercontent.com/luizgrp/SectionedRecyclerViewAdapter/master/art/sc3.png" width="300" height="533" >
![Loading](art/sc2.png)
![Loaded](art/sc3.png)

---

Expand All @@ -26,9 +25,13 @@ Add this to the `dependencies` section in your project-level **build.gradle** fi
implementation 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:x.y.z'
```

Guide to upgrade to version 3.x [here](https://github.com/luizgrp/SectionedRecyclerViewAdapter/wiki/Upgrading-to-3.x)

Latest version without AndroidX: `1.2.0`.

## Basic usage

##### 1) Create a custom section class:
##### 1) Create a custom Section class:

```java
class MySection extends Section {
Expand Down Expand Up @@ -60,6 +63,12 @@ class MySection extends Section {
// bind your view here
itemHolder.tvItem.setText(itemList.get(position));
}

@Override
public RecyclerView.ViewHolder getHeaderViewHolder(View view) {
// return an empty instance of ViewHolder for the headers of this section
return new EmptyViewHolder(view);
}
}
```

Expand Down Expand Up @@ -96,20 +105,21 @@ recyclerView.setAdapter(sectionAdapter);

You can find a demo app [here](app).

<img src="https://raw.githubusercontent.com/luizgrp/SectionedRecyclerViewAdapter/master/art/demosc.png" width="300" height="533" >
![Demo](art/demosc.png)

## Examples

Please check the implementation of the examples:

- [Section with Header](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example1Fragment.java)
- [Section with Header and Footer](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example2Fragment.java)
- [Section with States](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example3Fragment.java)
- [Expandable Section](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example4Fragment.java)
- [Grid Section with Header](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example5Fragment.java)
- [Expandable Grid Section](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example6Fragment.java)
- [SearchView with Sections](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example7Fragment.java)
- [Animations](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example8Fragment.java)
- [Section with States](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/Example3Fragment.java)
- [Payloads](app/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/demo/example9/Example9Fragment.java)

## Apps on Google Play using this library

Expand Down
Binary file modified art/demosc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/sc1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/sc2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/sc3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/sc4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bf653b5

Please sign in to comment.