I\'ve come about as far as this which gets me halfway there, but not quite.
I have a dialer Fragment
that has all the usual Button
s to enter a numb
The exact functionality that you require is provided by setting the flag textIsSelectable
in EditText to true. With this, the cursor will still be present, and you'll be able to select/copy/cut/paste, but SoftKeyboard will never show. Requires API 11 and above.
You can set it in your xml layout like this:
Or programmatically, like this:
EditText editText = (EditText) findViewById(R.id.editText);
editText.setTextIsSelectable(true);
For anyone using API 10 and below, hack is provided here : https://stackoverflow.com/a/20173020/7550472