Enforcing Input Method of Edit Text
<p>I've tried searching around for an answer to this but I can't seem to find an answer.</p>

<p>Is it possible for me to prevent a user from changing the input method of an edittext that I have created? Currently I have an edittext which I would like to only accept numbers from the user by displaying a soft keyboard similiar to the phone keypad input. By declaring the following in XML :</p>

<pre><code>    &lt;EditText 
    android:layout_height="wrap_content"    
    android:layout_width="fill_parent"    
    android:singleLine="true"     
    android:inputType="phone"
    android:numeric="decimal"       
    /&gt;
</code></pre>

<p>And also attaching a custom DigitsKeyListener to the edittext that returns InputType.TYPE_CLASS_PHONE in the getInputType method, I have succesfully made the edittext only accept decimal numbers as well as use the soft keyboard that I want.</p>

<p>The problem however starts if the user is not using the default Android Keyboard. If the user has changed their input method to a custom keyboard or to certain locales such as the Japanese IME, the soft keyboard that is shown becomes lacking for my application's purpose.</p>

<p>This can be achieved by long holding on the edittext and selecting a different input method, or changing it in another application will also affect my application.</p>

<p>My question is, is there any possible way for me to prevent other Input Methods from being used in my application? I want my application to always use the default Android Keyboard, and nothing else.</p>
