How do I set the keyboard to display specific characters in Android?

14 Views Asked by At

I want the "," sign to be not just inactive, but not on the keyboard at all. How can I do that?

\<EditText
android:id="@+id/MyEd"
android:layout_x="53dp"
android:layout_y="80dp"
android:layout_width="192dp"
android:textSize="20sp"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:text=""
android:singleLine="true"
android:enabled="true"
android:focusableInTouchMode="true"
android:cursorVisible="true"
android:focusable="true"  
android:textColor="@drawable/ed_text_selector"
android:background="@drawable/ed_text_rounded"
android:inputType="number"
android:digits="0123456789."
android:maxLength="25"
android:selectAllOnFocus="true"/\>

android:inputType="number" android:digits="0123456789."

1

There are 1 best solutions below

0
Gabe Sechan On

You can't. The keyboard is a separate app, and there is no mechanism to force it to display certain things. Even if there was, that other app may not respect it. Even high level ideas like numeric keyboard are suggestions, not enforced.