0

This may seem like a dumb question, but I want the magnifying glass on the keyboard, but I don't want the focus to go right to the next element.

I've got an EditText that populates a ListView with possible matches to the user's query. The EditText's XML includes

"android:imeOptions="actionSearch"

which adds the search icon. But it also takes the user to the first element of the ListView which is really annoying.

Is there a way to include the search icon AND not force focus to the ListView?

EDIT:

By request, my EditText xml. Sorry in advance if I mess up the formatting somehow.

<EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/editSearchWord"
        android:imeOptions="actionSearch|normal"
        android:inputType="text"
        android:drawableLeft="@android:drawable/ic_menu_search"
        android:layout_alignParentStart="true"/>
Paul
  • 1
  • 2

0 Answers0