Android7.0中文文档(API)-- AutoCompleteTextView.Validator

来源:互联网 发布:java 小写字母转大写 编辑:程序博客网 时间:2024/06/10 02:15

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/AutoCompleteTextView.Validator.html

AutoCompleteTextView.Validator

public static interface AutoCompleteTextView.Validator

android.widget.AutoCompleteTextView.Validator

This interface is used to make sure that the text entered in this TextView complies to a certain format. Since there is no foolproof way to prevent the user from leaving this View with an incorrect value in it, all we can do is try to fix it ourselves when this happens.
此接口用于确保在此TextView中输入的文本符合某种格式。由于没有一种万无一失的方法来防止用户在这个视图中留下一个不正确的值,所以我们所能做的就是在这种情况发生时尝试自己修复它。

摘要


Public方法

abstract CharSequencefixText(CharSequence invalidText)

Corrects the specified text to make it valid.
修正指定的文本以使其有效。

abstract booleanisValid(CharSequence text)

Validates the specified text.
验证指定的文本。

Public方法


fixText

API level 1版本中可用
CharSequence fixText (CharSequence invalidText)

Corrects the specified text to make it valid.
修正指定的文本以使其有效。

原创粉丝点击