Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afd6a2ca authored by Abhishek Aggarwal's avatar Abhishek Aggarwal
Browse files

blissinput: Fix search key not working

parent 6375e48d
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:hint="@string/search"
                android:inputType="text"
                android:imeOptions="actionSearch"
                android:importantForAutofill="no"
                android:maxLines="1"
+7 −5
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ import android.content.Intent
import android.graphics.Color
import android.util.AttributeSet
import android.view.DragEvent
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.GridLayout
import android.widget.ImageView
import android.widget.LinearLayout
@@ -112,12 +112,14 @@ class BlissInput(context: Context, attrs: AttributeSet) :
                }
            }

            setOnKeyListener { _, keyCode, _ ->
                if (keyCode == KeyEvent.KEYCODE_ENTER) {
            mSearchInput.setOnEditorActionListener { _, actionId, event ->
                if (actionId == EditorInfo.IME_ACTION_SEARCH) {
                    clearFocus()
                    openSearch(text.toString())
                }
                    openSearch(mSearchInput.text.toString())
                    true
                } else {
                    false
                }
            }

            setOnFocusChangeListener { _, hasFocus ->