0

hello i am making an app calculator for android when the user click's on the edit-box the keyboard pops (Phone) up how can i disable keyboard when app is running?? Reason is I have already made the number button's so the keyboard make it really hard to navigate.

Thank you

1 Answers1

1

You need to disable the soft keyboard, add attribute in xml of that edit text.

<EditText android:id=".."
      ..
      android:focusable="false" />

It will stop the execution of soft keyboard.

or

Create your own class that extends EditText and override the onCheckIsTextEditor():

public class NoImeEditText extends EditText {
public EditTextEx(Context context, AttributeSet attrs) { 
super(context, attrs);     
}      
@Override      
public boolean onCheckIsTextEditor() {   
return false;     
}        
} 
totneschap
  • 262
  • 2
  • 3
  • 12