IT. Expert System.

Android Reference

AccessibilityRecordCompat


android.support.v4.view.accessibility

Class AccessibilityRecordCompat

  • java.lang.Object
    • android.support.v4.view.accessibility.AccessibilityRecordCompat


  • public class AccessibilityRecordCompat
    extends Object
    Helper for accessing AccessibilityRecord introduced after API level 4 in a backwards compatible fashion.
    • Constructor Detail

      • AccessibilityRecordCompat

        public AccessibilityRecordCompat(Object record)
    • Method Detail

      • getImpl

        public Object getImpl()
        Returns:
        The wrapped implementation.
      • obtain

        public static AccessibilityRecordCompat obtain()
        Returns a cached instance if such is available or a new one is instantiated.
        Returns:
        An instance.
      • setSource

        public void setSource(View source)
        Sets the event source.
        Parameters:
        source - The source.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • setSource

        public void setSource(View root,
                     int virtualDescendantId)
        Sets the source to be a virtual descendant of the given root. If virtualDescendantId equals to View.NO_ID the root is set as the source.

        A virtual descendant is an imaginary View that is reported as a part of the view hierarchy for accessibility purposes. This enables custom views that draw complex content to report them selves as a tree of virtual views, thus conveying their logical structure.

        Parameters:
        root - The root of the virtual subtree.
        virtualDescendantId - The id of the virtual descendant.
      • getWindowId

        public int getWindowId()
        Gets the id of the window from which the event comes from.
        Returns:
        The window id.
      • isChecked

        public boolean isChecked()
        Gets if the source is checked.
        Returns:
        True if the view is checked, false otherwise.
      • setChecked

        public void setChecked(boolean isChecked)
        Sets if the source is checked.
        Parameters:
        isChecked - True if the view is checked, false otherwise.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • isEnabled

        public boolean isEnabled()
        Gets if the source is enabled.
        Returns:
        True if the view is enabled, false otherwise.
      • setEnabled

        public void setEnabled(boolean isEnabled)
        Sets if the source is enabled.
        Parameters:
        isEnabled - True if the view is enabled, false otherwise.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • isPassword

        public boolean isPassword()
        Gets if the source is a password field.
        Returns:
        True if the view is a password field, false otherwise.
      • setPassword

        public void setPassword(boolean isPassword)
        Sets if the source is a password field.
        Parameters:
        isPassword - True if the view is a password field, false otherwise.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • isFullScreen

        public boolean isFullScreen()
        Gets if the source is taking the entire screen.
        Returns:
        True if the source is full screen, false otherwise.
      • setFullScreen

        public void setFullScreen(boolean isFullScreen)
        Sets if the source is taking the entire screen.
        Parameters:
        isFullScreen - True if the source is full screen, false otherwise.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • isScrollable

        public boolean isScrollable()
        Gets if the source is scrollable.
        Returns:
        True if the source is scrollable, false otherwise.
      • setScrollable

        public void setScrollable(boolean scrollable)
        Sets if the source is scrollable.
        Parameters:
        scrollable - True if the source is scrollable, false otherwise.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getItemCount

        public int getItemCount()
        Gets the number of items that can be visited.
        Returns:
        The number of items.
      • setItemCount

        public void setItemCount(int itemCount)
        Sets the number of items that can be visited.
        Parameters:
        itemCount - The number of items.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getCurrentItemIndex

        public int getCurrentItemIndex()
        Gets the index of the source in the list of items the can be visited.
        Returns:
        The current item index.
      • setCurrentItemIndex

        public void setCurrentItemIndex(int currentItemIndex)
        Sets the index of the source in the list of items that can be visited.
        Parameters:
        currentItemIndex - The current item index.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getFromIndex

        public int getFromIndex()
        Gets the index of the first character of the changed sequence, or the beginning of a text selection or the index of the first visible item when scrolling.
        Returns:
        The index of the first character or selection start or the first visible item.
      • setFromIndex

        public void setFromIndex(int fromIndex)
        Sets the index of the first character of the changed sequence or the beginning of a text selection or the index of the first visible item when scrolling.
        Parameters:
        fromIndex - The index of the first character or selection start or the first visible item.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getToIndex

        public int getToIndex()
        Gets the index of text selection end or the index of the last visible item when scrolling.
        Returns:
        The index of selection end or last item index.
      • setToIndex

        public void setToIndex(int toIndex)
        Sets the index of text selection end or the index of the last visible item when scrolling.
        Parameters:
        toIndex - The index of selection end or last item index.
      • getScrollX

        public int getScrollX()
        Gets the scroll offset of the source left edge in pixels.
        Returns:
        The scroll.
      • setScrollX

        public void setScrollX(int scrollX)
        Sets the scroll offset of the source left edge in pixels.
        Parameters:
        scrollX - The scroll.
      • getScrollY

        public int getScrollY()
        Gets the scroll offset of the source top edge in pixels.
        Returns:
        The scroll.
      • setScrollY

        public void setScrollY(int scrollY)
        Sets the scroll offset of the source top edge in pixels.
        Parameters:
        scrollY - The scroll.
      • getMaxScrollX

        public int getMaxScrollX()
        Gets the max scroll offset of the source left edge in pixels.
        Returns:
        The max scroll.
      • setMaxScrollX

        public void setMaxScrollX(int maxScrollX)
        Sets the max scroll offset of the source left edge in pixels.
        Parameters:
        maxScrollX - The max scroll.
      • getMaxScrollY

        public int getMaxScrollY()
        Gets the max scroll offset of the source top edge in pixels.
        Returns:
        The max scroll.
      • setMaxScrollY

        public void setMaxScrollY(int maxScrollY)
        Sets the max scroll offset of the source top edge in pixels.
        Parameters:
        maxScrollY - The max scroll.
      • getAddedCount

        public int getAddedCount()
        Gets the number of added characters.
        Returns:
        The number of added characters.
      • setAddedCount

        public void setAddedCount(int addedCount)
        Sets the number of added characters.
        Parameters:
        addedCount - The number of added characters.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getRemovedCount

        public int getRemovedCount()
        Gets the number of removed characters.
        Returns:
        The number of removed characters.
      • setRemovedCount

        public void setRemovedCount(int removedCount)
        Sets the number of removed characters.
        Parameters:
        removedCount - The number of removed characters.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getClassName

        public CharSequence getClassName()
        Gets the class name of the source.
        Returns:
        The class name.
      • setClassName

        public void setClassName(CharSequence className)
        Sets the class name of the source.
        Parameters:
        className - The lass name.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getText

        public List<CharSequence> getText()
        Gets the text of the event. The index in the list represents the priority of the text. Specifically, the lower the index the higher the priority.
        Returns:
        The text.
      • getBeforeText

        public CharSequence getBeforeText()
        Sets the text before a change.
        Returns:
        The text before the change.
      • setBeforeText

        public void setBeforeText(CharSequence beforeText)
        Sets the text before a change.
        Parameters:
        beforeText - The text before the change.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getContentDescription

        public CharSequence getContentDescription()
        Gets the description of the source.
        Returns:
        The description.
      • setContentDescription

        public void setContentDescription(CharSequence contentDescription)
        Sets the description of the source.
        Parameters:
        contentDescription - The description.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • getParcelableData

        public Parcelable getParcelableData()
        Gets the Parcelable data.
        Returns:
        The parcelable data.
      • setParcelableData

        public void setParcelableData(Parcelable parcelableData)
        Sets the Parcelable data of the event.
        Parameters:
        parcelableData - The parcelable data.
        Throws:
        IllegalStateException - If called from an AccessibilityService.
      • recycle

        public void recycle()
        Return an instance back to be reused.

        Note: You must not touch the object after calling this function.

        Throws:
        IllegalStateException - If the record is already recycled.
      • hashCode

        public int hashCode()
        Description copied from class: Object
        Returns an integer hash code for this object. By contract, any two objects for which Object.equals(java.lang.Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

        Note that hash values must not change over time unless information used in equals comparisons also changes.

        See Writing a correct hashCode method if you intend implementing your own hashCode method.

        Overrides:
        hashCode in class Object
        Returns:
        this object's hash code.
        See Also:
        Object.equals(java.lang.Object)
      • equals

        public boolean equals(Object obj)
        Description copied from class: Object
        Compares this instance with the specified object and indicates if they are equal. In order to be equal, o must represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.

        The default implementation returns true only if this == o. See Writing a correct equals method if you intend implementing your own equals method.

        The general contract for the equals and Object.hashCode() methods is that if equals returns true for any two objects, then hashCode() must return the same value for these objects. This means that subclasses of Object usually override either both methods or neither of them.

        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare this instance with.
        Returns:
        true if the specified object is equal to this Object; false otherwise.
        See Also:
        Object.hashCode()


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: 217 / 158852693. Delta: 0.03799 с