Code example for AccessibilityManager

Methods: isEnabled

0
 
    @Override 
    public boolean performClick() { 
        // When accessibility is on, simulate press and release to preserve the 
        // semantic meaning of performClick(). Required for Braille support. 
        if (mAccessibilityManager.isEnabled()) {
            // Checking the press state prevents double activation. 
            if (!isPressed()) {
                setPressed(true); 
                setPressed(false); 
            } 
 
            return true; 
        } 
 
        return super.performClick(); 
    } 
 
    @Override 
    public boolean onHoverEvent(MotionEvent event) {
        // When touch exploration is turned on, lifting a finger while inside