Reputation: 451
I want to hide the mic from soft keyboard in my current application.
I have tried these possible solutions for the same.
Disable speech to text button (Micro phone) on soft input keyboard in android programmatically
But this solution is not working at all.
I found one unexpected thing, when add the inputType = “textFilter” then it works for me, I mean the mic is getting hidden.
But If possible then I want to have the exact solution for the problem, because If I adopt the mentioned “textFilter” thing then later times it may break.
I have tried on below O.S. versions
Upvotes: 0
Views: 902
Reputation: 1868
You can also define android:privateImeOptions="nm" in XML where nm = [no microphone]:
<AutoCompleteTextView
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:privateImeOptions="nm" />
Upvotes: 1