/**
* @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.");
if (maxLength < 1)
throw new IllegalArgumentException("Max length for input dialogs cannot be less than 1.");
this.inputMinLength = minLength;
this.inputMaxLength = maxLength;
if (errorColor == 0) {
this.inputRangeErrorColor = DialogUtils.getColor(context, R.color.md_edittext_error);
} else {
this.inputRangeErrorColor = errorColor;
}
return this;
}
MaterialDialog.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:EasyFrame
作者:
评论列表
文章目录