Keyboard with search icon

945 Views Asked by At

I have a SearchActivty in my application on which I have an EditText and a Button to search the items. I want the search icon to be displayed in keyboard for this EditText.

Right now I've imeOption = "actionSearch" inside my EditText layout which is right now giving "search" as text in the keyboard. I want instead of text there should be an icon. IS it possible to set search icon on place of text in keyboard. If yes then please help.

My EditText in layout is :

<EditText 
     android:id="@+id/txtUser"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:hint="type name here"
     android:inputType="text"
     android:singleLine="true"       
     android:imeOptions="actionSearch"/>
1

There are 1 best solutions below

0
On

No, its not possible. The keyboard itself decides what should be shown where. Some keyboards will implement images for various imeOptions, some won't. But there's no way to force it.