Code example for EditText

Methods: getSelectionStartlength

0
        mLineLength = nDigits;
    } 
 
    boolean eatHorizontalMove(boolean toLeft) {
        EditText editText = mDisplay.getEditText();
        int cursorPos = editText.getSelectionStart();
        return toLeft ? cursorPos == 0 : cursorPos >= editText.length();
    } 
 
    private String getText() {
        return mDisplay.getText().toString();
    } 
 
    void insert(String delta) {
        mDisplay.insert(delta);
        setDeleteMode(DELETE_MODE_BACKSPACE);
    } 
 
    public void onTextChanged() { 
        setDeleteMode(DELETE_MODE_BACKSPACE);
    }