Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 8985b21

Browse files
committed
1. Update readme
2. Update version name in gradle files
1 parent 8ec18e2 commit 8985b21

File tree

5 files changed

+70
-13
lines changed

5 files changed

+70
-13
lines changed

README.md

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ The minimum API level supported by this library is API 9.
1818

1919
```gradle
2020
dependencies {
21-
// ... other dependencies here
22-
compile 'com.github.devahamed:multi-view-adapter:1.1.0'
21+
compile 'com.github.devahamed:multi-view-adapter:1.2.0'
22+
23+
// If you want to use data binding
24+
compile 'com.github.devahamed:multi-view-adapter-databinding:1.2.0'
2325
}
2426
```
2527

@@ -54,15 +56,72 @@ You can read more about this library here in this [Medium article](https://mediu
5456

5557
## Features
5658

57-
1. Supports different span count for different ItemBinders.
58-
2. Adds different ItemDecoration for different ItemBinders.
59-
3. Items can be selected - Single and Multiple selection options are available.
60-
4. Out of the box support for DiffUtil.
59+
1. Multiple data set can be added to the adapter. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Multiple-Data-Set)
60+
2. Adds different ItemDecoration for different ItemBinders. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Custom-Item-Decoration)
61+
3. Single and Multiple selection options are available. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Choice-Modes)
62+
4. Out of the box support for DiffUtil. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/DiffUtil-and-Payload)
63+
5. Custom span count for every binder. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Grid-Adapter)
64+
6. Data binding support. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Data-Binding)
65+
7. Advanced drag and drop support. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Drag-and-Drop)
66+
8. Swipe to dismiss. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Swipe-To-Dismiss)
67+
9. Infinite scrolling. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Infinite-Scrolling)
68+
10. Helper class for contextual action mode. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Contextual-Action-Mode)
69+
11. Items can be expanded/collapsed. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Expandable-Item)
70+
12. Groups can be expanded/collapsed. [WikiDoc](https://github.com/DevAhamed/MultiViewAdapter/wiki/Expandable-Group)
71+
72+
## File Templates
73+
74+
This library has default file templates for creating Adapters, ItemBinders for given model name. Take a look at wiki page for using the file templates. [Wiki page](https://github.com/DevAhamed/MultiViewAdapter/wiki/File-Templates)
6175

6276
## Usage
63-
To get some idea about the MultiViewAdapter features kindly look at sample app code.
64-
Also we have comprehensive wiki pages as well. Take a look at [JCenter](https://github.com/DevAhamed/MultiViewAdapter/wiki).
77+
Let us display list of cars. No fuss. Here is the entire code.
78+
79+
80+
<b>CarBinder</b>
81+
82+
```java
83+
class CarBinder extends ItemBinder<CarModel, CarBinder.CarViewHolder> {
84+
85+
@Override public CarViewHolder create(LayoutInflater inflater, ViewGroup parent) {
86+
return new CarViewHolder(inflater.inflate(R.layout.item_car, parent, false));
87+
}
88+
89+
@Override public boolean canBindData(Object item) {
90+
return item instanceof CarModel;
91+
}
92+
93+
@Override public void bind(CarViewHolder holder, CarModel item) {
94+
// Bind the data here
95+
}
96+
97+
static class CarViewHolder extends BaseViewHolder<CarModel> {
98+
// Normal ViewHolder code
99+
}
100+
}
101+
```
102+
103+
<b>In your Activity/Fragment</b>
104+
105+
```java
106+
class CarListActivity extends Activity {
107+
108+
private RecyclerView recyclerView;
109+
private List<CarModel> cars;
110+
111+
public void initViews() {
112+
SimpleRecyclerAdapter<CarModel, CarBinder> adapter =
113+
new SimpleRecyclerAdapter<>(new CarBinder());
65114

115+
recyclerView.setAdapter(adapter);
116+
adapter.setDataList(cars);
117+
}
118+
}
119+
```
120+
Now you are good to go.
121+
<br/>
122+
<br/>
123+
For advanced usage and features kindly take a look at sample app code.
124+
Also we have comprehensive wiki pages as well. Take a look at [Wiki home](https://github.com/DevAhamed/MultiViewAdapter/wiki).
66125

67126
## Changelog
68127
See the project's Releases page for a list of versions with their changelog. [View Releases](https://github.com/DevAhamed/MultiViewAdapter/releases)<br/>

build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ buildscript {
44
}
55
dependencies {
66
classpath 'com.android.tools.build:gradle:2.3.3'
7-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
8-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
97
}
108
}
119

multi-view-adapter-databinding/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
minSdkVersion 9
3535
targetSdkVersion 25
3636
versionCode 1
37-
versionName "1.0"
37+
versionName "1.2.0"
3838

3939
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
4040
}

multi-view-adapter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
minSdkVersion 9
3535
targetSdkVersion 25
3636
versionCode 1
37-
versionName "1.1.0"
37+
versionName "1.2.0"
3838

3939
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
4040
}

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android {
2525
minSdkVersion 16
2626
targetSdkVersion 25
2727
versionCode 1
28-
versionName "1.1.0"
28+
versionName "1.2.0"
2929

3030
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3131
}

0 commit comments

Comments
 (0)