From 8fb336671f478ad7f74a523111cf0f7364e53f35 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 25 Sep 2019 12:17:03 +0800 Subject: [PATCH] up --- .../app/lib/theme/view/ATEAutoCompleteTextView.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATEAutoCompleteTextView.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATEAutoCompleteTextView.kt index b42587aae..855d82720 100644 --- a/app/src/main/java/io/legado/app/lib/theme/view/ATEAutoCompleteTextView.kt +++ b/app/src/main/java/io/legado/app/lib/theme/view/ATEAutoCompleteTextView.kt @@ -22,7 +22,7 @@ import org.jetbrains.anko.sdk27.listeners.onClick class ATEAutoCompleteTextView(context: Context, attrs: AttributeSet) : AppCompatAutoCompleteTextView(context, attrs) { - var callBack: CallBack? = null + var delCallBack: DelCallBack? = null var showDel: Boolean = false init { @@ -48,12 +48,12 @@ class ATEAutoCompleteTextView(context: Context, attrs: AttributeSet) : performFiltering(text, KeyEvent.KEYCODE_UNKNOWN) } - fun setSelectValues(values: List, showDel: Boolean = false) { + fun setFilterValues(values: List, showDel: Boolean = false) { this.showDel = showDel setAdapter(MyAdapter(context, values)) } - fun setSelectValues(vararg value: String, showDel: Boolean = false) { + fun setFilterValues(vararg value: String, showDel: Boolean = false) { this.showDel = showDel setAdapter(MyAdapter(context, value.toMutableList())) } @@ -69,7 +69,7 @@ class ATEAutoCompleteTextView(context: Context, attrs: AttributeSet) : view.iv_delete.onClick { getItem(position)?.let { remove(it) - callBack?.delete(it) + delCallBack?.delete(it) performFiltering() } } @@ -77,7 +77,7 @@ class ATEAutoCompleteTextView(context: Context, attrs: AttributeSet) : } } - interface CallBack { + interface DelCallBack { fun delete(value: String) } }