Using a custom keyboard to enter and manipulate data in EditText
<p>I want the user to enter data in an <code>EditText</code> using a custom keypad. The custom keypad is integrated to the layout. It is not supposed to pop up when the EditText in question is in focus.</p>

<p>The problem I have is that I can't disable the soft keyboard without disabling the editing properties of the <code>EditText</code>: I want the user to be able to position the cursor for example.</p>

<p>I have tried using the <code>InputMethodManager</code> </p>

<pre><code>InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
</code></pre>

<p>but it doesn't work at least on some OS versions. The keyboard still pops up when I tap the EditText.</p>

<p>I have also tried setting the input mode:</p>

<pre><code>edtView.setInputType(0)
</code></pre>

<p>but then I cannot position a cursor. I could <a href="http://developer.android.com/reference/android/text/Selection.html#setSelection%28android.text.Spannable,%20int%29" rel="nofollow">Selection.setSelection(Spannable txt, int index);</a> to position the cursor, but how to know the position the user has touched?</p>
