android-AccessibilityManager
来源:互联网 发布:ubuntu iptables 编辑:程序博客网 时间:2024/06/09 18:54
AccessibilityManager
public final class AccessibilityManager
extends Object
System level service that serves as an event dispatch for AccessibilityEvent
s, and provides facilities for querying the accessibility state of the system. Accessibility events are generated when something notable happens in the user interface, for example an Activity
starts, the focus or selection of a View
changes etc. Parties interested in handling accessibility events implement and register an accessibility service which extends AccessibilityService
.
To obtain a handle to the accessibility manager do the following:
AccessibilityManager accessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
See also:
AccessibilityEvent
AccessibilityNodeInfo
AccessibilityService
getSystemService(Class)
ACCESSIBILITY_SERVICE
Summary
Nested classes
interface
AccessibilityManager.AccessibilityStateChangeListener
Listener for the system accessibility state.
interface
AccessibilityManager.TouchExplorationStateChangeListener
Listener for the system touch exploration state.
Public methods
boolean
addAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListenerlistener)
Registers an AccessibilityManager.AccessibilityStateChangeListener
for changes in the global accessibility state of the system.
boolean
addTouchExplorationStateChangeListener(AccessibilityManager.TouchExplorationStateChangeListenerlistener)
Registers a AccessibilityManager.TouchExplorationStateChangeListener
for changes in the global touch exploration state of the system.
List<ServiceInfo>
getAccessibilityServiceList()
This method was deprecated in API level 14. Use getInstalledAccessibilityServiceList()
List<AccessibilityServiceInfo>
getEnabledAccessibilityServiceList(int feedbackTypeFlags)
Returns the AccessibilityServiceInfo
s of the enabled accessibility services for a given feedback type.
List<AccessibilityServiceInfo>
getInstalledAccessibilityServiceList()
Returns the AccessibilityServiceInfo
s of the installed accessibility services.
void
interrupt()
Requests feedback interruption from all accessibility services.
boolean
isEnabled()
Returns if the accessibility in the system is enabled.
boolean
isTouchExplorationEnabled()
Returns if the touch exploration in the system is enabled.
boolean
removeAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListenerlistener)
Unregisters an AccessibilityManager.AccessibilityStateChangeListener
.
boolean
removeTouchExplorationStateChangeListener(AccessibilityManager.TouchExplorationStateChangeListenerlistener)
Unregisters a AccessibilityManager.TouchExplorationStateChangeListener
.
void
sendAccessibilityEvent(AccessibilityEvent event)
Sends an AccessibilityEvent
.
Inherited methods
java.lang.Object
Public methods
addAccessibilityStateChangeListener
boolean addAccessibilityStateChangeListener (AccessibilityManager.AccessibilityStateChangeListener listener)
Registers an AccessibilityManager.AccessibilityStateChangeListener
for changes in the global accessibility state of the system.
listener
AccessibilityManager.AccessibilityStateChangeListener
: The listener.boolean
True if successfully registered.addTouchExplorationStateChangeListener
boolean addTouchExplorationStateChangeListener (AccessibilityManager.TouchExplorationStateChangeListener listener)
Registers a AccessibilityManager.TouchExplorationStateChangeListener
for changes in the global touch exploration state of the system.
listener
AccessibilityManager.TouchExplorationStateChangeListener
: The listener.boolean
True if successfully registered.getAccessibilityServiceList
List<ServiceInfo> getAccessibilityServiceList ()
This method was deprecated in API level 14.
Use getInstalledAccessibilityServiceList()
Returns the ServiceInfo
s of the installed accessibility services.
List<ServiceInfo>
An unmodifiable list with ServiceInfo
s.getEnabledAccessibilityServiceList
List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList (int feedbackTypeFlags)
Returns the AccessibilityServiceInfo
s of the enabled accessibility services for a given feedback type.
feedbackTypeFlags
int
: The feedback type flags.List<AccessibilityServiceInfo>
An unmodifiable list with AccessibilityServiceInfo
s.See also:
FEEDBACK_AUDIBLE
FEEDBACK_GENERIC
FEEDBACK_HAPTIC
FEEDBACK_SPOKEN
FEEDBACK_VISUAL
FEEDBACK_BRAILLE
getInstalledAccessibilityServiceList
List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList ()
Returns the AccessibilityServiceInfo
s of the installed accessibility services.
List<AccessibilityServiceInfo>
An unmodifiable list with AccessibilityServiceInfo
s.interrupt
void interrupt ()
Requests feedback interruption from all accessibility services.
isEnabled
boolean isEnabled ()
Returns if the accessibility in the system is enabled.
boolean
True if accessibility is enabled, false otherwise.isTouchExplorationEnabled
boolean isTouchExplorationEnabled ()
Returns if the touch exploration in the system is enabled.
boolean
True if touch exploration is enabled, false otherwise.removeAccessibilityStateChangeListener
boolean removeAccessibilityStateChangeListener (AccessibilityManager.AccessibilityStateChangeListener listener)
Unregisters an AccessibilityManager.AccessibilityStateChangeListener
.
listener
AccessibilityManager.AccessibilityStateChangeListener
: The listener.boolean
True if successfully unregistered.removeTouchExplorationStateChangeListener
boolean removeTouchExplorationStateChangeListener (AccessibilityManager.TouchExplorationStateChangeListener listener)
Unregisters a AccessibilityManager.TouchExplorationStateChangeListener
.
listener
AccessibilityManager.TouchExplorationStateChangeListener
: The listener.boolean
True if successfully unregistered.sendAccessibilityEvent
void sendAccessibilityEvent (AccessibilityEvent event)
Sends an AccessibilityEvent
.
event
AccessibilityEvent
: The event to send.IllegalStateException
if accessibility is not enabled. Note: The preferred mechanism for sending custom accessibility events is through callingrequestSendAccessibilityEvent(View, AccessibilityEvent)
instead of this method to allow predecessors to augment/filter events sent by their descendants.- android-AccessibilityManager
- 内存泄露:AccessibilityManager
- Android
- android
- Android
- android
- android
- Android
- Android
- android
- android
- android
- Android
- Android
- android!!!
- android
- android
- android
- java内存模型的理解
- C/C+语言struct深层探索
- java 基础知识问题集
- 明清时期江右商的宗族教育——江西流坑村的历史人类学考察
- 插入排序
- android-AccessibilityManager
- Javascript 排序数组或对象
- c/c++中的static
- 输入两个整数m和n,计算m需要改变多少位才能得到n
- php四种基础算法:冒泡,选择,插入和快速排序法
- hibernate study
- 设计模式:单一职责原则
- Program4_H
- 术语介绍