This commit is contained in:
Max Lv
2013-05-20 12:55:38 +08:00
parent fbcf90e6dc
commit 4ee9eea291
5 changed files with 9 additions and 20 deletions
@@ -8,15 +8,14 @@ class PasswordEditTextPreference(context: Context, attrs: AttributeSet, defStyle
extends EditTextPreference(context, attrs, defStyle) {
def this(context: Context, attrs: AttributeSet) = {
this (context, attrs, android.R.attr.editTextPreferenceStyle)
this(context, attrs, android.R.attr.editTextPreferenceStyle)
mDefaultSummary = getSummary
}
override def setSummary(summary: CharSequence) {
if (summary.toString.isEmpty) {
super.setSummary(mDefaultSummary)
}
else {
} else {
super.setSummary(summary.toString.map(c => "*").mkString)
}
}
@@ -8,15 +8,14 @@ class SummaryEditTextPreference(context: Context, attrs: AttributeSet, defStyle:
extends EditTextPreference(context, attrs, defStyle) {
def this(context: Context, attrs: AttributeSet) = {
this (context, attrs, android.R.attr.editTextPreferenceStyle)
this(context, attrs, android.R.attr.editTextPreferenceStyle)
mDefaultSummary = getSummary
}
override def setSummary(summary: CharSequence) {
if (summary.toString.isEmpty) {
super.setSummary(mDefaultSummary)
}
else {
} else {
super.setSummary(summary)
}
}