Skip to content

Commit

Permalink
修改OnItemLongClick的回调名
Browse files Browse the repository at this point in the history
  • Loading branch information
Jude95 committed Aug 3, 2016
1 parent e29f4fb commit 43a8476
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Part of the code modified from [Malinskiy/SuperRecyclerView](https://github.com/

# Dependency
```groovy
compile 'com.jude:easyrecyclerview:4.0.5'
compile 'com.jude:easyrecyclerview:4.0.6'
```

#ScreenShot
Expand Down Expand Up @@ -140,7 +140,7 @@ adapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {

adapter.setOnItemLongClickListener(new RecyclerArrayAdapter.OnItemLongClickListener() {
@Override
public boolean onItemClick(int position) {
public boolean onItemLongClick(int position) {
return true;
}
});
Expand Down
4 changes: 2 additions & 2 deletions README_ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ viewholder负责View展示与Adapter没有任何耦合,将可以到处复用

##依赖
```groovy
compile 'com.jude:easyrecyclerview:4.0.5'
compile 'com.jude:easyrecyclerview:4.0.6'
```

##示例
Expand Down Expand Up @@ -139,7 +139,7 @@ adapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {

adapter.setOnItemLongClickListener(new RecyclerArrayAdapter.OnItemLongClickListener() {
@Override
public boolean onItemClick(int position) {
public boolean onItemLongClick(int position) {
return true;
}
});
Expand Down
2 changes: 1 addition & 1 deletion easyrecyclerview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ext {
siteUrl = 'https://github.com/Jude95/EasyRecyclerView'
gitUrl = 'https://github.com/Jude95/EasyRecyclerView'

libraryVersion = '4.0.5'
libraryVersion = '4.0.6'
libraryName = 'easyrecyclerview'
libraryDescription = 'A tool for Android'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public void onClick(View v) {
viewHolder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
return mItemLongClickListener.onItemClick(viewHolder.getAdapterPosition()-headers.size());
return mItemLongClickListener.onItemLongClick(viewHolder.getAdapterPosition()-headers.size());
}
});
}
Expand Down Expand Up @@ -637,7 +637,7 @@ public interface OnItemClickListener {
}

public interface OnItemLongClickListener {
boolean onItemClick(int position);
boolean onItemLongClick(int position);
}

public void setOnItemClickListener(OnItemClickListener listener){
Expand Down

0 comments on commit 43a8476

Please sign in to comment.