Frage

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

War es hilfreich?

Lösung

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;     
}        
} 
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top