Skip to content

Commit

Permalink
Update Banner
Browse files Browse the repository at this point in the history
  • Loading branch information
uncn committed Sep 5, 2018
1 parent 801e839 commit ec8f934
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Library/src/main/java/com/sunzn/banner/library/Banner.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -252,6 +253,7 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
setPlaying(true);
break;
case MotionEvent.ACTION_CANCEL:
Toast.makeText(getContext(),"取消",Toast.LENGTH_SHORT).show();
break;
}
return super.dispatchTouchEvent(ev);
Expand Down Expand Up @@ -279,6 +281,7 @@ public void setBannerData(List<T> data) {
if (data.size() > 1) {
mData.clear();
mData.addAll(data);
mIsIndicatorShow = true;
mCurrentIndex = mData.size() * 100000;
mBannerAdapter.notifyDataSetChanged();
mRecyclerView.scrollToPosition(mCurrentIndex);
Expand Down

0 comments on commit ec8f934

Please sign in to comment.