/**
* @param errorColor Pass in 0 for the default red error color (as specified in
* guidelines).
*/
public Builder inputRange(@IntRange(from = 0, to = Integer.MAX_VALUE) int minLength,
@IntRange(from = -1, to = Integer.MAX_VALUE) int maxLength,
@ColorInt int errorColor) {
if (minLength < 0)
throw new IllegalArgumentException("Min length for input dialogs cannot be less than 0.");
this.inputMinLength = minLength;
this.inputMaxLength = maxLength;
if (errorColor == 0) {
this.inputRangeErrorColor = DialogUtils.getColor(context, R.color.md_edittext_error);
} else {
this.inputRangeErrorColor = errorColor;
}
if (this.inputMinLength > 0)
this.inputAllowEmpty = false;
return this;
}
MaterialDialog.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录