Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ConvenientBanner.java #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ public ConvenientBanner setPageIndicator(int[] page_indicatorId) {
mPointViews.clear();
this.page_indicatorId = page_indicatorId;
if (mDatas == null) return this;

//modify by yuxing begin 只有一张图片的话就不设置指示器
if(mDatas!=null&&mDatas.size()==1){
return this;
}
//modify by yuxing end

for (int count = 0; count < mDatas.size(); count++) {
// 翻页指示的点
ImageView pointView = new ImageView(getContext());
Expand Down Expand Up @@ -250,6 +257,13 @@ public boolean isTurning() {
* @return
*/
public ConvenientBanner startTurning(long autoTurningTime) {

//modify by yuxing begin 只有一张图片的话就不滚动翻页
if(mDatas!=null&&mDatas.size()==1){
return this;
}
//modify by yuxing end

if (autoTurningTime < 0) return this;
//如果是正在翻页的话先停掉
if (turning) {
Expand Down