完整内容,请查看: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 CharSequence fixText(CharSequence invalidText)

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

abstract boolean isValid(CharSequence text)

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

Public方法

fixText

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

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

更多相关文章

  1. Android布局属性
  2. Android(安卓)控件属性
  3. android开发之android:padding和android:margin的区别
  4. Android(安卓)ApiDemos示例解析(140):Views->Layouts->Baseline-
  5. TextView(标签控件)
  6. android EditText输入限制
  7. Android(安卓)EditText属性
  8. Android(安卓)EditText属性
  9. android中控件的大部分属性解释

随机推荐

  1. Android推荐使用的尺寸单位dp和sp
  2. Android应用程序框架思路整理
  3. Android实现短信验证功能(功能的使用)
  4. Android(安卓)开发之旅:短信的收发及在and
  5. Android(安卓)小米盒子游戏手柄按键捕获
  6. Android官方架构组件LiveData: 观察者模
  7. Android(安卓)开源框架Universal-Image-L
  8. Android(安卓)按键事件处理详解
  9. Android高德获取逆地址编码(经纬度坐标-
  10. Android(安卓)LayoutInflater原理解析