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 08f77a0 commit 801e839
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Library/src/main/java/com/sunzn/banner/library/Banner.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ private void init(Context context, AttributeSet attrs) {
new PagerSnapHelper().attachToRecyclerView(mRecyclerView);
mBannerAdapter = new BannerAdapter();
mRecyclerView.setAdapter(mBannerAdapter);
mRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER);
mRecyclerView.setLayoutManager(new BannerLayoutManager(context, LinearLayoutManager.HORIZONTAL, false, mInch));
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
Expand Down Expand Up @@ -272,12 +273,6 @@ protected void onDetachedFromWindow() {
unrReceiver();
}

@Override
protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
// setPlaying(visibility == VISIBLE);
}

public void setBannerData(List<T> data) {
setPlaying(false);
if (data != null && data.size() > 0) {
Expand Down

0 comments on commit 801e839

Please sign in to comment.