Skip to content
Open
Show file tree
Hide file tree
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 @@ -28,6 +28,8 @@ public class LFilePicker {
private boolean mMutilyMode = true;
private boolean mChooseMode = true;
private String mAddText;
private String mAddTextColor;
private String mAddBackgroundColor;
private int mIconStyle;
private String[] mFileTypes;
private String mNotFoundFiles;
Expand Down Expand Up @@ -170,6 +172,28 @@ public LFilePicker withAddText(String text) {
return this;
}

/**
* 设置多选时按钮文字颜色
*
* @param color
* @return
*/
public LFilePicker withAddTextColor(String color) {
this.mAddTextColor = color;
return this;
}

/**
* 设置多选时按钮背景颜色
*
* @param color
* @return
*/
public LFilePicker withAddBackgroundColor(String color) {
this.mAddBackgroundColor = color;
return this;
}

/**
* 设置文件夹图标风格
*
Expand Down Expand Up @@ -293,6 +317,8 @@ private Bundle getBundle() {
paramEntity.setBackIcon(mBackStyle);
paramEntity.setMutilyMode(mMutilyMode);
paramEntity.setAddText(mAddText);
paramEntity.setAddTextColor(mAddTextColor);
paramEntity.setAddBackgroundColor(mAddBackgroundColor);
paramEntity.setIconStyle(mIconStyle);
paramEntity.setFileTypes(mFileTypes);
paramEntity.setNotFoundFiles(mNotFoundFiles);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class ParamEntity implements Serializable {
private int backIcon;
private boolean mutilyMode;
private String addText;
private String addTextColor;
private String addBackgroundColor;
private int iconStyle;
private String[] fileTypes;
private String notFoundFiles;
Expand Down Expand Up @@ -88,6 +90,22 @@ public String getAddText() {
return addText;
}

public String getAddTextColor() {
return addTextColor;
}

public void setAddTextColor(String addTextColor) {
this.addTextColor = addTextColor;
}

public String getAddBackgroundColor() {
return addBackgroundColor;
}

public void setAddBackgroundColor(String addBackgroundColor) {
this.addBackgroundColor = addBackgroundColor;
}

public void setAddText(String addText) {
this.addText = addText;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ private void initView() {
if (mParamEntity.getAddText() != null) {
mBtnAddBook.setText(mParamEntity.getAddText());
}
if (mParamEntity.getAddTextColor() != null) {
mBtnAddBook.setTextColor(Color.parseColor(mParamEntity.getAddTextColor()));
}
if (mParamEntity.getAddBackgroundColor() != null) {
mBtnAddBook.setBackgroundColor(Color.parseColor(mParamEntity.getAddBackgroundColor()));
}
}

/**
Expand Down