Search code examples
androidandroid-edittextandroid-softkeyboardime

Change search button color in keyboard


I have made an EditText in order to search for something.

The EditText looks like this:

enter image description here

The xml of this is:

<EditText
    android:id="@+id/Et_Search"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginEnd="24dp"
    android:layout_marginTop="24dp"
    android:layout_marginStart="24dp"
    android:layout_marginBottom="8dp"
    android:background="@drawable/et_rounded"
    android:hint="@string/Activity_Search"
    android:imeOptions="actionSearch"
    android:inputType="text"
    android:paddingStart="56dp"
    android:paddingEnd="64dp"
    android:textColorHint="@color/colorGray"
    android:textSize="16sp"
    app:layout_constraintTop_toTopOf="parent" />

Since im using android:imeOptions="actionSearch", the keyboard that opens when I type looks like this:

enter image description here

I was wondering if there is an option to change the color of the circle from green to some other color?

It seems like this green is some Primary color of the app however I don't have this color anywhere.

Thank you


Solution

  • As you may have already explored that you can modify the action button from the keyboard, by setting imeOptions. But you cannot override Icons, colors or backgrounds or the keys of the System provided Soft Keyboard.

    To do so you may have to implement your custom keyboard. like so you can modify everything in keys of that Custom Keyboard View.