Fix filter input text introducing a new line. Also fix filter drawer clicks propagated to the views below

This commit is contained in:
len 2017-01-21 20:31:25 +01:00
parent c3c2013944
commit 7f8bfd759f
3 changed files with 7 additions and 5 deletions

View File

@ -23,7 +23,6 @@ open class TextItem(val filter: Filter.Text) : AbstractFlexibleItem<TextItem.Hol
}
override fun bindViewHolder(adapter: FlexibleAdapter<*>, holder: Holder, position: Int, payloads: List<Any?>?) {
holder.wrapper.visibility = if (filter.name.isEmpty()) View.GONE else View.VISIBLE
holder.wrapper.hint = filter.name
holder.edit.setText(filter.state)
holder.edit.addTextChangedListener(object : SimpleTextWatcher() {

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true">
<LinearLayout
android:layout_width="match_parent"

View File

@ -20,6 +20,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxLines="1"
android:inputType="text"
android:imeOptions="actionDone"
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />