Code example for Editable

Methods: getSelectionEnd, getSelectionStart, length, toString

0
                et.text = mEditable.toString();
                et.partialEndOffset = mEditable.length();
                et.selectionStart = Selection.getSelectionStart(mEditable);
                et.selectionEnd = Selection.getSelectionEnd(mEditable);
            } 
            et.flags = mSingleLine ? ExtractedText.FLAG_SINGLE_LINE : 0;
            return et;
        } 
 
        @Override 
        public boolean deleteSurroundingText(int leftLength, int rightLength) {
            if (!super.deleteSurroundingText(leftLength, rightLength)) {
                return false; 
            } 
            shouldUpdateImeSelection = true;
            return mImeAdapter.deleteSurroundingText(leftLength, rightLength);
        } 
 
        @Override 
        public boolean sendKeyEvent(KeyEvent event) {
            mImeAdapter.mSelectionHandleController.hideAndDisallowAutomaticShowing();