From c8fc70c908cd94930a39b5577abdf26ec5970c65 Mon Sep 17 00:00:00 2001 From: Ztiany Date: Fri, 25 Oct 2019 18:27:23 +0800 Subject: [PATCH] update UIKit --- .../java/com/android/base/app/ui/UIKit.kt | 2 +- .../android/base/utils/android/InputTypes.kt | 36 ------------------- 2 files changed, 1 insertion(+), 37 deletions(-) delete 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/app/ui/UIKit.kt b/lib_base/src/main/java/com/android/base/app/ui/UIKit.kt index 8c96c6d..badf0be 100644 --- a/lib_base/src/main/java/com/android/base/app/ui/UIKit.kt +++ b/lib_base/src/main/java/com/android/base/app/ui/UIKit.kt @@ -268,7 +268,7 @@ fun RefreshStateLayout.handleResult(t: T?, onEmpty: (() -> Unit)? = null, on if (isRefreshing) { refreshCompleted() } - if (t == null || (t is Collection<*> && t.isEmpty()) || (t is Map<*, *> && t.isEmpty())) { + if (t == null || (t is CharSequence && (t.isEmpty() || t.isBlank())) || (t is Collection<*> && t.isEmpty()) || (t is Map<*, *> && t.isEmpty())) { if (onEmpty != null) { onEmpty() } else { 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 deleted file mode 100644 index 7e21ac4..0000000 --- a/lib_base/src/main/java/com/android/base/utils/android/InputTypes.kt +++ /dev/null @@ -1,36 +0,0 @@ -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