Commit 72305c5f authored by Mygod's avatar Mygod

Fix a bug in SummaryEditTextPreference

parent 4303c1cd
......@@ -41,6 +41,7 @@ package com.github.shadowsocks.preferences
import android.content.Context
import android.preference.EditTextPreference
import android.text.TextUtils
import android.util.AttributeSet
class SummaryEditTextPreference(context: Context, attrs: AttributeSet, defStyle: Int)
......@@ -57,7 +58,7 @@ class SummaryEditTextPreference(context: Context, attrs: AttributeSet, defStyle:
}
override def setSummary(summary: CharSequence) {
if (summary.toString.isEmpty) {
if (TextUtils.isEmpty(summary)) {
super.setSummary(mDefaultSummary)
} else {
super.setSummary(summary)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment