diff --git a/.idea/misc.xml b/.idea/misc.xml index 9c39cb9..0f0a584 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/README.md b/README.md index b9c445a..e69ea63 100644 --- a/README.md +++ b/README.md @@ -119,13 +119,13 @@ Override```public void loadImage(ImageView view, int position, String url)``` to * OnClick ``` -private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener() { +private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener() { @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(); } }; ``` diff --git a/app/src/main/java/com/kcode/autoviewpager/MainActivity.java b/app/src/main/java/com/kcode/autoviewpager/MainActivity.java index 27b4770..5ff41e0 100644 --- a/app/src/main/java/com/kcode/autoviewpager/MainActivity.java +++ b/app/src/main/java/com/kcode/autoviewpager/MainActivity.java @@ -54,13 +54,13 @@ protected void onDestroy() { mViewPager.onDestroy(); } - private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener() { + private BaseViewPagerAdapter.OnAutoViewPagerItemClickListener listener = new BaseViewPagerAdapter.OnAutoViewPagerItemClickListener() { @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(); } }; }