add InputTypes

androidx
Ztiany 5 years ago
parent 5c8f152686
commit 584b0f58d7
  1. 36
      lib_base/src/main/java/com/android/base/utils/android/InputTypes.kt
  2. 13
      lib_media_selector/src/main/java/com/android/sdk/mediaselector/CropOptions.java

@ -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

@ -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;
@ -39,9 +37,6 @@ public class CropOptions implements Serializable {
/**
* 高度比例与aspectX组合如16:9
*
* @param aspectY
* @return
*/
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;

Loading…
Cancel
Save