Skip to content

Commit

Permalink
add null-safety; update readme
Browse files Browse the repository at this point in the history
(cherry picked from commit ecf7346)
  • Loading branch information
dumchev committed Aug 28, 2018
1 parent 66f9b4a commit 115c4c2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you are going to use it with Kotlin, go to the part [Example of usage in Kotl
## Dependencies

```groovy
compile 'com.github.liverm0r:delegateadapters:v1.11'
implementation 'com.github.liverm0r:delegateadapters:v1.12'
```

You also have to add this in your project build.gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract protected void onBindViewHolder(@NonNull View view,
abstract protected VH createViewHolder(View parent);

@Override
public void onRecycled(VH holder) {
public void onRecycled(@NonNull VH holder) {
}

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public final void onBindViewHolder(RecyclerView.ViewHolder holder, int position)
}

@Override
public void onViewRecycled(RecyclerView.ViewHolder holder) {
public void onViewRecycled(@NonNull RecyclerView.ViewHolder holder) {
//noinspection unchecked
typeToAdapterMap.get(holder.getItemViewType()).onRecycled(holder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void onBindViewHolder(@NonNull VH holder,
@NonNull List<T> items,
int position);

void onRecycled(VH holder);
void onRecycled(@NonNull VH holder);

boolean isForViewType(@NonNull List<?> items, int position);
}

0 comments on commit 115c4c2

Please sign in to comment.