android.support.design.widget.TextInputLayout.isErrorEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中android.support.design.widget.TextInputLayout.isErrorEnabled()方法的一些代码示例,展示了TextInputLayout.isErrorEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextInputLayout.isErrorEnabled()方法的具体详情如下:
包路径:android.support.design.widget.TextInputLayout
类名称:TextInputLayout
方法名:isErrorEnabled

TextInputLayout.isErrorEnabled介绍

暂无

代码示例

代码示例来源:origin: willowtreeapps/Hyperion-Android

@NonNull
  @Override
  public List<ViewAttribute> collect(TextInputLayout view, AttributeTranslator attributeTranslator) {
    List<ViewAttribute> attributes = new ArrayList<>();
    attributes.add(new ViewAttribute<>("PasswordToggleDrawable",
        view.getPasswordVisibilityToggleDrawable()));
    attributes.add(new ViewAttribute<>("PasswordToggleContentDisc",
        nonNull(view.getPasswordVisibilityToggleContentDescription())));
    attributes.add(new ViewAttribute<>("CounterMaxLength", view.getCounterMaxLength()));
    attributes.add(new ViewAttribute<>("Hint", nonNull(view.getHint())));
    attributes.add(new ViewAttribute<>("CounterEnabled", view.isCounterEnabled()));
    attributes.add(new ViewAttribute<>("ErrorEnabled", view.isErrorEnabled()));
    attributes.add(new ViewAttribute<>("HintAnimationEnabled", view.isHintAnimationEnabled()));
    attributes.add(new ViewAttribute<>("HintEnabled", view.isHintEnabled()));
    attributes.add(new ViewAttribute<>("PasswordToggleEnabled",
        view.isPasswordVisibilityToggleEnabled()));
    return attributes;
  }
}

代码示例来源:origin: canceel/flexboxlayout

@Override
  public void onClick(View v) {
    if (orderTextInput.isErrorEnabled() || flexGrowInput.isErrorEnabled() ||
        flexBasisPercentInput.isErrorEnabled() || widthInput.isErrorEnabled() ||
        heightInput.isErrorEnabled()) {
      Toast.makeText(getActivity(), R.string.invalid_values_exist, Toast.LENGTH_SHORT)
          .show();
      return;
    }
    if (mFlexItemChangedListener != null) {
      mFlexItemChangedListener.onFlexItemChanged(mFlexItem);
    }
    dismiss();
  }
});

代码示例来源:origin: canceel/flexboxlayout

@Override
public void afterTextChanged(Editable editable) {
  if (mTextInputLayout.isErrorEnabled() || TextUtils.isEmpty(editable) ||
      !mInputValidator.isValidInput(editable.toString())) {
    return;

代码示例来源:origin: jbruchanov/AnUitor

@Override
  protected HashMap<String, Object> fillValues(View v, HashMap<String, Object> data, HashMap<String, Object> parentData) {
    super.fillValues(v, data, parentData);

    TextInputLayout view = (TextInputLayout) v;

    data.put("Error", view.getError());
    data.put("Hint", view.getHint());
    data.put("PasswordVisibilityToggleContentDescription", view.getPasswordVisibilityToggleContentDescription());
    data.put("PasswordVisibilityToggleDrawable:", view.getPasswordVisibilityToggleDrawable());
    data.put("Typeface:", view.getTypeface());
    data.put("IsCounterEnabled", view.isCounterEnabled());
    data.put("IsErrorEnabled", view.isErrorEnabled());
    data.put("IsHintAnimationEnabled", view.isHintAnimationEnabled());
    data.put("IsHintEnabled", view.isHintEnabled());
    data.put("IsPasswordVisibilityToggleEnabled", view.isPasswordVisibilityToggleEnabled());

    return data;
  }
}

相关文章