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

重新设定布局参数,重走布局策略 #45

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 @@ -683,7 +683,8 @@ public void setAdapter(NineGridImageViewAdapter adapter) {
* @param gap 宫格间距 px
*/
public void setGap(int gap) {
mGap = gap;
mGap = gap;
requestLayout();
}

/**
Expand All @@ -692,16 +693,18 @@ public void setGap(int gap) {
* @param showStyle 显示风格
*/
public void setShowStyle(int showStyle) {
mShowStyle = showStyle;
}
mShowStyle = showStyle;
requestLayout();
}

/**
* 设置只有一张图片时的尺寸大小
*
* @param singleImgSize 单张图片的尺寸大小
*/
public void setSingleImgSize(int singleImgSize) {
mSingleImgSize = singleImgSize;
mSingleImgSize = singleImgSize;
requestLayout();
}

/**
Expand All @@ -710,8 +713,9 @@ public void setSingleImgSize(int singleImgSize) {
* @param maxSize 最大图片数
*/
public void setMaxSize(int maxSize) {
mMaxSize = maxSize;
}
mMaxSize = maxSize;
requestLayout();
}

public void setItemImageClickListener(ItemImageClickListener<T> itemImageViewClickListener) {
mItemImageClickListener = itemImageViewClickListener;
Expand All @@ -720,4 +724,4 @@ public void setItemImageClickListener(ItemImageClickListener<T> itemImageViewCli
public void setItemImageLongClickListener(ItemImageLongClickListener<T> itemImageViewLongClickListener) {
mItemImageLongClickListener = itemImageViewLongClickListener;
}
}
}