IT. Expert System.

Android Reference

Selection


android.text

Class Selection



  • public class Selection
    extends Object
    Utility class for manipulating cursors and selections in CharSequences. A cursor is a selection where the start and end are at the same offset.
    • Field Detail

      • SELECTION_START

        public static final Object SELECTION_START
      • SELECTION_END

        public static final Object SELECTION_END
    • Method Detail

      • getSelectionStart

        public static final int getSelectionStart(CharSequence text)
        Return the offset of the selection anchor or cursor, or -1 if there is no selection or cursor.
      • getSelectionEnd

        public static final int getSelectionEnd(CharSequence text)
        Return the offset of the selection edge or cursor, or -1 if there is no selection or cursor.
      • setSelection

        public static void setSelection(Spannable text,
                        int start,
                        int stop)
        Set the selection anchor to start and the selection edge to stop.
      • setSelection

        public static final void setSelection(Spannable text,
                        int index)
        Move the cursor to offset index.
      • selectAll

        public static final void selectAll(Spannable text)
        Select the entire text.
      • extendSelection

        public static final void extendSelection(Spannable text,
                           int index)
        Move the selection edge to offset index.
      • removeSelection

        public static final void removeSelection(Spannable text)
        Remove the selection or cursor, if any, from the text.
      • moveUp

        public static boolean moveUp(Spannable text,
                     Layout layout)
        Move the cursor to the buffer offset physically above the current offset, or return false if the cursor is already on the top line.
      • moveDown

        public static boolean moveDown(Spannable text,
                       Layout layout)
        Move the cursor to the buffer offset physically below the current offset, or return false if the cursor is already on the bottom line.
      • moveLeft

        public static boolean moveLeft(Spannable text,
                       Layout layout)
        Move the cursor to the buffer offset physically to the left of the current offset, or return false if the cursor is already at the left edge of the line and there is not another line to move it to.
      • moveRight

        public static boolean moveRight(Spannable text,
                        Layout layout)
        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.
      • extendUp

        public static boolean extendUp(Spannable text,
                       Layout layout)
        Move the selection end to the buffer offset physically above the current selection end.
      • extendDown

        public static boolean extendDown(Spannable text,
                         Layout layout)
        Move the selection end to the buffer offset physically below the current selection end.
      • extendLeft

        public static boolean extendLeft(Spannable text,
                         Layout layout)
        Move the selection end to the buffer offset physically to the left of the current selection end.
      • extendRight

        public static boolean extendRight(Spannable text,
                          Layout layout)
        Move the selection end to the buffer offset physically to the right of the current selection end.
      • extendToLeftEdge

        public static boolean extendToLeftEdge(Spannable text,
                               Layout layout)
      • extendToRightEdge

        public static boolean extendToRightEdge(Spannable text,
                                Layout layout)
      • moveToLeftEdge

        public static boolean moveToLeftEdge(Spannable text,
                             Layout layout)
      • moveToRightEdge

        public static boolean moveToRightEdge(Spannable text,
                              Layout layout)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 366 / 158735344. Delta: 0.04216 с