Skip to content

Commit

Permalink
add null-safety; update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dumchev committed Aug 28, 2018
1 parent ccce43d commit f96a5b9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This lib is inspired by Hannes Dorfmann [AdapterDelegates](https://github.com/so

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

for kotlin:
Expand All @@ -19,7 +19,7 @@ android {
experimental = true
}
}
compile 'com.github.liverm0r:delegateadapters:v2.0'
implementation 'com.github.liverm0r:delegateadapters:v2.0'
```

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 f96a5b9

Please sign in to comment.