Code example for AccessibilityManager

Methods: isTouchExplorationEnabled

0
         * @param eventType The type of the event to send. 
         */ 
        private void sendAccessibilityEventForVirtualView(VirtualView virtualView, int eventType) {
            // If touch exploration, i.e. the user gets feedback while touching 
            // the screen, is enabled we fire accessibility events. 
            if (mAccessibilityManager.isTouchExplorationEnabled()) {
                AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
                event.setPackageName(getContext().getPackageName());
                event.setClassName(virtualView.getClass().getName());
                event.setSource(VirtualSubtreeRootView.this, virtualView.mId);
                event.getText().add(virtualView.mText);
                getParent().requestSendAccessibilityEvent(VirtualSubtreeRootView.this, event);
            } 
        } 
 
        /** 
         * Finds a virtual view given its id. 
         * 
         * @param id The virtual view id. 
         * @return The found virtual view. 
Stop searching for code, let great code find you!  Add Codota to your java IDE