Fix setText null crash
This commit is contained in:
@@ -10,7 +10,7 @@ android {
|
|||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
resConfigs "zh-rCN"
|
resConfigs "zh-rCN"
|
||||||
versionCode 21
|
versionCode 22
|
||||||
versionName "1.3.1"
|
versionName "1.3.1"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ open class AlwaysAutoCompleteEditTextPreference @JvmOverloads constructor(
|
|||||||
editText.id = android.R.id.edit
|
editText.id = android.R.id.edit
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setText(text: String) {
|
override fun setText(text: String?) {
|
||||||
val oldText = getText()
|
val oldText = getText()
|
||||||
super.setText(text)
|
super.setText(text)
|
||||||
if (!TextUtils.equals(text, oldText)) notifyChanged()
|
if (!TextUtils.equals(text, oldText)) notifyChanged()
|
||||||
|
|||||||
Reference in New Issue
Block a user