NextInput bindings for Android - NextInput的Android擴展

jopen 8年前發布 | 8K 次閱讀 Android開發 移動開發

NextInputs-Android 基于 NextInputs https://github.com/yoojia/NextInputs 的擴展,增加Android組件的支持。

NextInputs項目地址:https://github.com/yoojia/NextInputs

特性

  • 輕量級,自然快;
  • 使用簡單;
  • 內置大量常用校驗模式;
  • 支持自定義校驗模式擴展;
  • 支持自定義校驗目標擴展;
  • 支持自定義錯誤消息提示;

使用示例

AndroidNextInputs inputs = new AndroidNextInputs();
inputs.add(Inputs.editText(mUsernameEditText),
        StaticPattern.Required(),
        StaticPattern.Email()
);
boolean passed = inputs.test();

配置 Gradle 依賴

dependencies {
    compile 'com.github.yoojia:next-inputs-android:<latest-version>'
}

當前最新版本為 1.0-beta

dependencies {
    compile 'com.github.yoojia:next-inputs-android:1.0-beta'
}

項目地址: https://github.com/yoojia/NextInputs-Android

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!