pull/34/head
kunfei 5 years ago
parent fd7f61f7b3
commit 5907da9b30
  1. 12
      app/src/main/java/io/legado/app/lib/theme/view/ATEAutoCompleteTextView.kt

@ -1,8 +1,10 @@
package io.legado.app.lib.theme.view
import android.content.Context
import android.graphics.Rect
import android.os.Build
import android.util.AttributeSet
import android.view.KeyEvent
import androidx.appcompat.widget.AppCompatAutoCompleteTextView
import io.legado.app.lib.theme.Selector
import io.legado.app.lib.theme.ThemeStore
@ -19,4 +21,14 @@ class ATEAutoCompleteTextView(context: Context, attrs: AttributeSet) :
.create()
}
}
override fun enoughToFilter(): Boolean {
return true
}
override fun onFocusChanged(focused: Boolean, direction: Int, previouslyFocusedRect: Rect?) {
super.onFocusChanged(focused, direction, previouslyFocusedRect)
performFiltering(text, KeyEvent.KEYCODE_UNKNOWN)
}
}

Loading…
Cancel
Save