is Accessibility Enabled - Android User Interface

Android examples for User Interface:AccessibilityEvent

Description

is Accessibility Enabled

Demo Code


//package com.java2s;
import android.content.Context;
import android.support.v4.view.accessibility.AccessibilityManagerCompat;

import android.view.accessibility.AccessibilityManager;

public class Main {
    public static boolean isAccessibilityEnabled(Context context) {
        boolean flag;
        if (context != null)
            flag = AccessibilityManagerCompat
                    .isTouchExplorationEnabled((AccessibilityManager) context
                            .getSystemService("accessibility"));
        else/*from   ww w .  jav  a 2s. co  m*/
            flag = false;
        return flag;
    }
}

Related Tutorials