/// <summary> /// Move the selection end to the buffer offset physically to the right of /// the current selection end. /// </summary> /// <remarks> /// Move the selection end to the buffer offset physically to the right of /// the current selection end. /// </remarks> public static bool extendRight(android.text.Spannable text, android.text.Layout layout ) { int end = getSelectionEnd(text); int to = layout.getOffsetToRightOf(end); if (to != end) { extendSelection(text, to); return(true); } return(true); }
/// <summary> /// Move the cursor to the buffer offset physically to the right of /// the current offset, or return false if the cursor is already at /// at the right edge of the line and there is not another line /// to move it to. /// </summary> /// <remarks> /// Move the cursor to the buffer offset physically to the right of /// the current offset, or return false if the cursor is already at /// at the right edge of the line and there is not another line /// to move it to. /// </remarks> public static bool moveRight(android.text.Spannable text, android.text.Layout layout ) { int start = getSelectionStart(text); int end = getSelectionEnd(text); if (start != end) { setSelection(text, chooseHorizontal(layout, 1, start, end)); return(true); } else { int to = layout.getOffsetToRightOf(end); if (to != end) { setSelection(text, to); return(true); } } return(false); }