diff --git a/app/src/main/java/com/zhouwei/mzbannerview/MZModeBannerFragment.java b/app/src/main/java/com/zhouwei/mzbannerview/MZModeBannerFragment.java index 2b22674..9b56c87 100644 --- a/app/src/main/java/com/zhouwei/mzbannerview/MZModeBannerFragment.java +++ b/app/src/main/java/com/zhouwei/mzbannerview/MZModeBannerFragment.java @@ -44,6 +44,7 @@ public void onPageClick(View view, int position) { for(int i=0;i() { @Override public BannerViewHolder createViewHolder() { diff --git a/mzbanner/src/main/java/com/zhouwei/mzbanner/MZBannerView.java b/mzbanner/src/main/java/com/zhouwei/mzbanner/MZBannerView.java index eefdf6c..60e67f9 100644 --- a/mzbanner/src/main/java/com/zhouwei/mzbanner/MZBannerView.java +++ b/mzbanner/src/main/java/com/zhouwei/mzbanner/MZBannerView.java @@ -256,6 +256,18 @@ public void setBannerPageClickListener(BannerPageClickListener bannerPageClickLi mBannerPageClickListener = bannerPageClickListener; } + /** + * 是否显示Indicator + * @param visible true 显示Indicator,否则不显示 + */ + public void setIndicatorVisible(boolean visible){ + if(visible){ + mIndicatorContainer.setVisibility(VISIBLE); + }else{ + mIndicatorContainer.setVisibility(GONE); + } + } + /** * 返回ViewPager * @return {@link ViewPager}