Skip to content

Commit

Permalink
1.更新点击事件
Browse files Browse the repository at this point in the history
2.更新README
  • Loading branch information
caikaidev committed Oct 24, 2016
1 parent 1e6eb6d commit dcf488e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ Override```public void loadImage(ImageView view, int position, String url)``` to
* OnClick

```
private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener<Picture>() {
private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener<String>() {
@Override
public void onItemClick(int position, Picture picture) {
public void onItemClick(int position, String url) {
Toast.makeText(getApplicationContext(),
picture.getName(), Toast.LENGTH_SHORT).show();
url, Toast.LENGTH_SHORT).show();
}
};
```
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/kcode/autoviewpager/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ protected void onDestroy() {
mViewPager.onDestroy();
}

private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener<Picture>() {
private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener<String>() {

@Override
public void onItemClick(int position, Picture picture) {
public void onItemClick(int position, String url) {
Toast.makeText(getApplicationContext(),

picture.getName(), Toast.LENGTH_SHORT).show();
url, Toast.LENGTH_SHORT).show();
}
};
}

0 comments on commit dcf488e

Please sign in to comment.