Example usage for android.content Context ACCESSIBILITY_SERVICE

List of usage examples for android.content Context ACCESSIBILITY_SERVICE

Introduction

In this page you can find the example usage for android.content Context ACCESSIBILITY_SERVICE.

Prototype

String ACCESSIBILITY_SERVICE

To view the source code for android.content Context ACCESSIBILITY_SERVICE.

Click Source Link

Document

Use with #getSystemService(String) to retrieve a android.view.accessibility.AccessibilityManager for giving the user feedback for UI events through the registered event listeners.

Usage

From source file:com.bw.luzz.monkeyapplication.View.DateTimePicker.time.RadialPickerLayout.java

public RadialPickerLayout(Context context, AttributeSet attrs) {
    super(context, attrs);

    setOnTouchListener(this);
    ViewConfiguration vc = ViewConfiguration.get(context);
    TOUCH_SLOP = vc.getScaledTouchSlop();
    TAP_TIMEOUT = ViewConfiguration.getTapTimeout();
    mDoingMove = false;/*from www  . j a  va 2  s  .co  m*/

    mCircleView = new com.bw.luzz.monkeyapplication.View.DateTimePicker.time.CircleView(context);
    addView(mCircleView);

    mAmPmCirclesView = new AmPmCirclesView(context);
    addView(mAmPmCirclesView);

    mHourRadialSelectorView = new RadialSelectorView(context);
    addView(mHourRadialSelectorView);
    mMinuteRadialSelectorView = new RadialSelectorView(context);
    addView(mMinuteRadialSelectorView);
    mSecondRadialSelectorView = new RadialSelectorView(context);
    addView(mSecondRadialSelectorView);

    mHourRadialTextsView = new com.bw.luzz.monkeyapplication.View.DateTimePicker.time.RadialTextsView(context);
    addView(mHourRadialTextsView);
    mMinuteRadialTextsView = new com.bw.luzz.monkeyapplication.View.DateTimePicker.time.RadialTextsView(
            context);
    addView(mMinuteRadialTextsView);
    mSecondRadialTextsView = new com.bw.luzz.monkeyapplication.View.DateTimePicker.time.RadialTextsView(
            context);
    addView(mSecondRadialTextsView);

    // Prepare mapping to snap touchable degrees to selectable degrees.
    preparePrefer30sMap();

    mLastValueSelected = null;

    mInputEnabled = true;

    mGrayBox = new View(context);
    mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.MATCH_PARENT));
    mGrayBox.setBackgroundColor(ContextCompat.getColor(context, R.color.mdtp_transparent_black));
    mGrayBox.setVisibility(View.INVISIBLE);
    addView(mGrayBox);

    mAccessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);

    mTimeInitialized = false;
}

From source file:android.support.v14.preference.SwitchPreference.java

private void syncViewIfAccessibilityEnabled(View view) {
    AccessibilityManager accessibilityManager = (AccessibilityManager) getContext()
            .getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (!accessibilityManager.isEnabled()) {
        return;/*from   w w w. j a va2 s  .c  om*/
    }

    View switchView = view.findViewById(AndroidResources.ANDROID_R_SWITCH_WIDGET);
    syncSwitchView(switchView);

    View summaryView = view.findViewById(android.R.id.summary);
    syncSummaryView(summaryView);
}

From source file:com.views.ui.snackbar.Snackbar.java

private Snackbar(ViewGroup parent) {
    mTargetParent = parent;//w w w  .j  a v  a 2 s . co  m
    mContext = parent.getContext();

    ThemeUtils.checkAppCompatTheme(mContext);

    LayoutInflater inflater = LayoutInflater.from(mContext);
    mView = (SnackbarLayout) inflater.inflate(com.views.simpleutils.R.layout.view_tsnackbar_layout,
            mTargetParent, false);

    mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
}

From source file:com.android.talkback.eventprocessor.AccessibilityEventProcessor.java

public AccessibilityEventProcessor(TalkBackService service) {
    mAccessibilityManager = (AccessibilityManager) service.getSystemService(Context.ACCESSIBILITY_SERVICE);

    mService = service;
    initDumpEventMask();
}

From source file:com.lcl.designsnackbar.tsnackbar.TSnackbar.java

private TSnackbar(ViewGroup parent) {
    mTargetParent = parent;//  w  w w.  j  a v a  2s. co  m
    mContext = parent.getContext();

    ThemeUtils.checkAppCompatTheme(mContext);

    LayoutInflater inflater = LayoutInflater.from(mContext);
    mView = (SnackbarLayout) inflater.inflate(com.lcl.designsnackbar.R.layout.design_layout_tsnackbar,
            mTargetParent, false);

    mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
}

From source file:android.support.designox.widget.Snackbar.java

private Snackbar(ViewGroup parent) {
    mTargetParent = parent;// w ww.ja  v  a  2  s  .c  om
    mContext = parent.getContext();
    try {
        ThemeUtils.checkAppCompatTheme(mContext);

        LayoutInflater inflater = LayoutInflater.from(mContext);
        mView = (SnackbarLayout) inflater.inflate(R.layout.design_layout_snackbar, mTargetParent, false);

        //            mView = (SnackbarLayout) inflater.inflate(
        //                    R.layout.mysnackbarlayout, mTargetParent, false);

        mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
    } catch (Throwable th) {
        Log.d("Snackbar class", th.getMessage());
    }
}

From source file:com.github.topbottomsnackbar.TBSnackbar.java

private TBSnackbar(ViewGroup parent) {
    mTargetParent = parent;/*from   ww w  .j  av  a2  s.c o m*/
    mContext = parent.getContext();

    LayoutInflater inflater = LayoutInflater.from(mContext);
    mView = (SnackbarLayout) inflater.inflate(R.layout.design_layout_snackbar, mTargetParent, false);

    mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
}

From source file:com.trycatch.mysnackbar.TSnackbar.java

private TSnackbar(ViewGroup parent) {
    appearDirection = APPEAR_FROM_TOP_TO_DOWN;

    mParent = parent;//from  w  w w . j  ava  2 s  .com
    mContext = parent.getContext();
    LayoutInflater inflater = LayoutInflater.from(mContext);

    mView = (SnackbarLayout) inflater.inflate(R.layout.view_tsnackbar_layout, mParent, false);
    mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
}

From source file:com.jekyll.wu.widget.FreeSnackBar.java

private FreeSnackBar(ViewGroup parent) {
    mTargetParent = parent;//  www.j a  v a  2s . c om
    mContext = parent.getContext();

    ThemeUtils.checkAppCompatTheme(mContext);

    LayoutInflater inflater = LayoutInflater.from(mContext);
    mView = (SnackbarLayout) inflater.inflate(R.layout.my_design_layout_snackbar, mTargetParent, false);

    mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
}

From source file:com.box.myview.MyTopSnackBar.TSnackbar.java

private TSnackbar(ViewGroup parent) {
    appearDirection = APPEAR_FROM_TOP_TO_DOWN;

    mParent = parent;/*from   w w  w.  jav a2 s.  c  o m*/
    mContext = parent.getContext();
    LayoutInflater inflater = LayoutInflater.from(mContext);
    if (appearDirection == APPEAR_FROM_BOTTOM_TO_TOP) {
        mView = (SnackbarLayout) inflater.inflate(R.layout.view_bsnackbar_layout, mParent, false);
    } else {
        mView = (SnackbarLayout) inflater.inflate(R.layout.view_tsnackbar_layout, mParent, false);
    }
    mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);

}