List of usage examples for android.content Context ACCESSIBILITY_SERVICE
String ACCESSIBILITY_SERVICE
To view the source code for android.content Context ACCESSIBILITY_SERVICE.
Click Source Link
From source file:com.redinput.datetimepickercompat.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;// w w w. ja v a 2 s . c o m mCircleView = new CircleView(context); addView(mCircleView); mAmPmCirclesView = new AmPmCirclesView(context); addView(mAmPmCirclesView); mHourRadialTextsView = new RadialTextsView(context); addView(mHourRadialTextsView); mMinuteRadialTextsView = new RadialTextsView(context); addView(mMinuteRadialTextsView); mHourRadialSelectorView = new RadialSelectorView(context); addView(mHourRadialSelectorView); mMinuteRadialSelectorView = new RadialSelectorView(context); addView(mMinuteRadialSelectorView); // Prepare mapping to snap touchable degrees to selectable degrees. preparePrefer30sMap(); mVibrator = (Vibrator) context.getSystemService(Service.VIBRATOR_SERVICE); mLastVibrate = 0; mLastValueSelected = -1; mInputEnabled = true; mGrayBox = new View(context); mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); mGrayBox.setBackgroundColor(getResources().getColor(R.color.transparent_black)); mGrayBox.setVisibility(View.INVISIBLE); addView(mGrayBox); mAccessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); mTimeInitialized = false; installAccessibilityDelegate(); }
From source file:com.android.screenspeak.eventprocessor.ProcessorFocusAndSingleTap.java
public ProcessorFocusAndSingleTap(CursorController cursorController, FeedbackController feedbackController, SpeechController speechController, ScreenSpeakService service) { if (cursorController == null) throw new IllegalStateException(); if (feedbackController == null) throw new IllegalStateException(); if (speechController == null) throw new IllegalStateException(); mService = service;/*ww w . j ava 2 s .co m*/ mSpeechController = speechController; mCursorController = cursorController; mCursorController.addScrollListener(this); mHandler = new FollowFocusHandler(this, feedbackController); mAccessibilityManager = (AccessibilityManager) service.getSystemService(Context.ACCESSIBILITY_SERVICE); mFirstWindowFocusManager = new FirstWindowFocusManager(); }
From source file:com.android.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 w w w . j a v a 2 s . c om*/ mCircleView = new CircleView(context); addView(mCircleView); mAmPmCirclesView = new AmPmCirclesView(context); addView(mAmPmCirclesView); mHourRadialTextsView = new RadialTextsView(context); addView(mHourRadialTextsView); mMinuteRadialTextsView = new RadialTextsView(context); addView(mMinuteRadialTextsView); mHourRadialSelectorView = new RadialSelectorView(context); addView(mHourRadialSelectorView); mMinuteRadialSelectorView = new RadialSelectorView(context); addView(mMinuteRadialSelectorView); // Prepare mapping to snap touchable degrees to selectable degrees. preparePrefer30sMap(); mLastValueSelected = -1; mInputEnabled = true; mGrayBox = new View(context); mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); mGrayBox.setBackgroundColor(getResources().getColor(R.color.transparent_black)); mGrayBox.setVisibility(View.INVISIBLE); addView(mGrayBox); mAccessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); mTimeInitialized = false; installAccessibilityDelegate(); }
From source file:com.android.talkback.eventprocessor.ProcessorFocusAndSingleTap.java
public ProcessorFocusAndSingleTap(CursorController cursorController, FeedbackController feedbackController, SpeechController speechController, TalkBackService service) { if (cursorController == null) throw new IllegalStateException(); if (feedbackController == null) throw new IllegalStateException(); if (speechController == null) throw new IllegalStateException(); mService = service;/*from w w w . java2 s .c o m*/ mSpeechController = speechController; mCursorController = cursorController; mCursorController.addScrollListener(this); mHandler = new FollowFocusHandler(this, feedbackController); mAccessibilityManager = (AccessibilityManager) service.getSystemService(Context.ACCESSIBILITY_SERVICE); mFirstWindowFocusManager = new FirstWindowFocusManager(service); }
From source file:com.borax12.materialdaterangepicker.single.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 w w w . j a v a 2 s. co m*/ mCircleView = new 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 RadialTextsView(context); addView(mHourRadialTextsView); mMinuteRadialTextsView = new RadialTextsView(context); addView(mMinuteRadialTextsView); mSecondRadialTextsView = new 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:g7.bluesky.launcher3.AppsCustomizeTabHost.java
@Override public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) { mPagedView.onLauncherTransitionEnd(l, animated, toWorkspace); mInTransition = false;// w ww. j ava 2s . c om if (!toWorkspace) { // Make sure adjacent pages are loaded (we wait until after the transition to // prevent slowing down the animation) mPagedView.loadAssociatedPages(mPagedView.getCurrentPage()); // Opening apps, need to announce what page we are on. AccessibilityManager am = (AccessibilityManager) getContext() .getSystemService(Context.ACCESSIBILITY_SERVICE); if (am.isEnabled()) { // Notify the user when the page changes announceForAccessibility(mPagedView.getCurrentPageDescription()); } // Going from Workspace -> All Apps // NOTE: We should do this at the end since we check visibility state in some of the // cling initialization/dismiss code above. setVisibilityOfSiblingsWithLowerZOrder(INVISIBLE); } }
From source file:rikka.materialpreference.SwitchPreference.java
private void syncViewIfAccessibilityEnabled(View view) { AccessibilityManager accessibilityManager = (AccessibilityManager) getContext() .getSystemService(Context.ACCESSIBILITY_SERVICE); if (!accessibilityManager.isEnabled()) { return;/* w w w . j ava 2s . c o m*/ } View switchView = view.findViewById(R.id.switchWidget); syncSwitchView(switchView); View summaryView = view.findViewById(android.R.id.summary); syncSummaryView(summaryView); }
From source file:android.support.v7.preference.SwitchPreferenceCompat.java
private void syncViewIfAccessibilityEnabled(View view) { AccessibilityManager accessibilityManager = (AccessibilityManager) getContext() .getSystemService(Context.ACCESSIBILITY_SERVICE); if (!accessibilityManager.isEnabled()) { return;/*from w w w . ja v a2s . c o m*/ } View switchView = view.findViewById(R.id.switchWidget); syncSwitchView(switchView); View summaryView = view.findViewById(android.R.id.summary); syncSummaryView(summaryView); }
From source file:com.jet.sweettips.snackbar.SweetSnackbar.java
private SweetSnackbar(ViewGroup parent) { mTargetParent = parent;//from www . j a v a2 s .co m mContext = parent.getContext(); ThemeUtils.checkAppCompatTheme(mContext); LayoutInflater inflater = LayoutInflater.from(mContext); mView = (SnackbarLayout) inflater.inflate(com.jet.sweettips.R.layout.sweet_layout_snackbar, mTargetParent, false); mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); }
From source file:com.ingenia.fasttrack.SnackBar.MultilineSnackbar.java
private MultilineSnackbar(ViewGroup parent) { mTargetParent = parent;//from w w w .ja v a 2 s . c o m mContext = parent.getContext(); ThemeUtils.checkAppCompatTheme(mContext); LayoutInflater inflater = LayoutInflater.from(mContext); mView = (SnackbarLayout) inflater.inflate(R.layout.design_layout_snackbar_change, mTargetParent, false); mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); }