From 584b0f58d7adee8e063723b88a79eb220a2ff50e Mon Sep 17 00:00:00 2001 From: Ztiany Date: Tue, 22 Oct 2019 12:05:21 +0800 Subject: [PATCH] add InputTypes --- .../android/base/utils/android/InputTypes.kt | 36 +++++++++++++++++++ .../sdk/mediaselector/CropOptions.java | 15 ++------ 2 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 lib_base/src/main/java/com/android/base/utils/android/InputTypes.kt diff --git a/lib_base/src/main/java/com/android/base/utils/android/InputTypes.kt b/lib_base/src/main/java/com/android/base/utils/android/InputTypes.kt new file mode 100644 index 0000000..7e21ac4 --- /dev/null +++ b/lib_base/src/main/java/com/android/base/utils/android/InputTypes.kt @@ -0,0 +1,36 @@ +package com.android.base.utils.android + +import android.text.InputType + + +const val INPUT_DATE = InputType.TYPE_CLASS_DATETIME or InputType.TYPE_DATETIME_VARIATION_DATE +const val INPUT_DATETIME = InputType.TYPE_CLASS_DATETIME or InputType.TYPE_DATETIME_VARIATION_NORMAL +const val INPUT_NONE = InputType.TYPE_NULL +const val INPUT_NUMBER = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_VARIATION_NORMAL +const val INPUT_NUMBER_DECIMAL = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL +const val INPUT_NUMBER_PASSWORD = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_VARIATION_PASSWORD +const val INPUT_NUMBER_SIGNED = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_SIGNED +const val INPUT_PHONE = InputType.TYPE_CLASS_PHONE +const val INPUT_TEXT = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_NORMAL +const val INPUT_TEXT_AUTOCOMPLETE = InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE +const val INPUT_TEXT_AUTOCORRECT = InputType.TYPE_TEXT_FLAG_AUTO_CORRECT +const val INPUT_TEXT_CAPCHARACTERS = InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS +const val INPUT_TEXT_CAPSENTENCES = InputType.TYPE_TEXT_FLAG_CAP_SENTENCES +const val INPUT_TEXT_CAPWORDS = InputType.TYPE_TEXT_FLAG_CAP_WORDS +const val INPUT_TEXT_EMAILADDRESS = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS +const val INPUT_TEXT_EMAILSUBJECT = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_EMAIL_SUBJECT +const val INPUT_TEXT_FILTER = InputType.TYPE_TEXT_FLAG_IME_MULTI_LINE +const val INPUT_TEXT_LONGMESSAGE = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_LONG_MESSAGE +const val INPUT_TEXT_MULTILINE = InputType.TYPE_TEXT_FLAG_MULTI_LINE +const val INPUT_TEXT_NOSUGGESTIONS = InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS +const val INPUT_TEXT_PASSWORD = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD +const val INPUT_TEXT_PERSONNAME = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PERSON_NAME +const val INPUT_TEXT_PHONETIC = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PHONETIC +const val INPUT_TEXT_POSTALADDRESS = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_POSTAL_ADDRESS +const val INPUT_TEXT_SHORTMESSAGE = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE +const val INPUT_TEXT_URI = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_URI +const val INPUT_TEXT_VISIBLEPASSWORD = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD +const val INPUT_TEXT_WEBEDITTEXT = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT +const val INPUT_TEXT_WEBEMAILADDRESS = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS +const val INPUT_TEXT_WEBPASSWORD = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD +const val INPUT_TIME = InputType.TYPE_CLASS_DATETIME or InputType.TYPE_DATETIME_VARIATION_TIME \ No newline at end of file diff --git a/lib_media_selector/src/main/java/com/android/sdk/mediaselector/CropOptions.java b/lib_media_selector/src/main/java/com/android/sdk/mediaselector/CropOptions.java index e0eb950..6606e7d 100644 --- a/lib_media_selector/src/main/java/com/android/sdk/mediaselector/CropOptions.java +++ b/lib_media_selector/src/main/java/com/android/sdk/mediaselector/CropOptions.java @@ -7,6 +7,7 @@ import java.io.Serializable; * Author: JPH * Date: 2016/7/27 13:19 */ +@SuppressWarnings("WeakerAccess") public class CropOptions implements Serializable { private int aspectX = 1; @@ -24,9 +25,6 @@ public class CropOptions implements Serializable { /** * 裁剪宽度比例 与aspectY组合,如16:9 - * - * @param aspectX - * @return */ public CropOptions setAspectX(int aspectX) { this.aspectX = aspectX; @@ -38,10 +36,7 @@ public class CropOptions implements Serializable { } /** - * 高度比例 与aspectX组合,如16:9 - * - * @param aspectY - * @return + * 高度比例与aspectX组合,如16:9 */ public CropOptions setAspectY(int aspectY) { this.aspectY = aspectY; @@ -54,9 +49,6 @@ public class CropOptions implements Serializable { /** * 输出图片的宽度 - * - * @param outputX - * @return */ public CropOptions setOutputX(int outputX) { this.outputX = outputX; @@ -69,9 +61,6 @@ public class CropOptions implements Serializable { /** * 输入图片的高度 - * - * @param outputY - * @return */ public CropOptions setOutputY(int outputY) { this.outputY = outputY;