I am writing a calculator for Android, for inputting expression I use EditText. As I create my buttons - I do not need a software keyboard, but I want to change the cursor position, text selection, copy, paste. In a word - everything as it is, only the virtual keyboard is not displayed. In version 2.3 I could write:
EditText.setInputType (InputType.TYPE_NULL);
and it worked perfectly. In version 4 of the cursor is not displayed, the menu does not work, etc. Tried a bunch of ways - you can not move the cursor, the keyboard is displayed, and it was never really explained.
InputMethodManager imm = (InputMethodManager)getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0); //cursor not showing
------------------------------------------------------------------------
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); //not working
I want to make it as in Panecal, MobiCalc Free, Scientific Calculator. I would be happy with any helpful suggestions on this. P.S. Sorry for my English.