public boolean performHeaderClick(View view, long id) { if (mOnHeaderClickListener != null) { playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } mOnHeaderClickListener.onHeaderClick(this, view, id); return true; } return false; }
public boolean performHeaderLongPress(View view, long id) { boolean handled = false; if (mOnHeaderLongClickListener != null) { handled = mOnHeaderLongClickListener.onHeaderLongClick(this, view, id); } if (handled) { if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); } performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); } return handled; }
private boolean performPinnedItemClick() { if (mPinnedSection == null) return false; OnItemClickListener listener = getOnItemClickListener(); if (listener != null && getAdapter().isEnabled(mPinnedSection.position)) { View view = mPinnedSection.view; playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } listener.onItemClick(this, view, mPinnedSection.position, mPinnedSection.id); return true; } return false; }
public boolean performHeaderClick(View view, long id) { if (mOnHeaderClickListener != null) { playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } mOnHeaderClickListener.onHeaderClick(this, view, id); return true; } return false; }
public boolean performHeaderLongPress(View view, long id) { boolean handled = false; if (mOnHeaderLongClickListener != null) { handled = mOnHeaderLongClickListener.onHeaderLongClick(this, view, id); } if (handled) { if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); } performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); } return handled; }
playSoundEffect(SoundEffectConstants.CLICK); if (view != null) view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); mOnItemClickListener.onItemClick(this, view, position, id); return true;
/** * Invalidates cached information about the parent view. <p> You <b>must</b> call this method after adding or * removing items from the parent view. </p> */ public void invalidateParent() { mParentView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED); }
@Override public void run() { mTargetView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); }
@Override protected void execute() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { itemView.sendAccessibilityEvent(AccessibilityEvent.TYPE_ANNOUNCEMENT); } } }, 500);
@Override public void run() { mTargetView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); }
@Override public void run() { mTargetView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED); }
private void focusInputField(View view) { view.requestFocus(); view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); if (mObserverForTest != null) mObserverForTest.onPaymentRequestReadyToEdit(); } }
@Override public void run() { if (mCurrView != null && !mLongPressSent) { mLongPressSent = true; mCurrView.sendAccessibilityEvent( AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); mCurrView.getLocationOnScreen(mTmpPos); final int x = (int) ev.getRawX() - mTmpPos[0]; final int y = (int) ev.getRawY() - mTmpPos[1]; mLongPressListener.onLongPress(mCurrView, x, y); } } };
private void setInitialFocus() { InputMethodManager imm = (InputMethodManager) mDialog.getContext().getSystemService( Context.INPUT_METHOD_SERVICE); View view = mShouldRequestExpirationDate ? mMonthInput : mCardUnmaskInput; imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); if (sObserverForTest != null) { sObserverForTest.onCardUnmaskPromptReadyForInput(this); } }
public boolean performHeaderClick(View view, long id) { if (mOnHeaderClickListener != null) { playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } mOnHeaderClickListener.onHeaderClick(this, view, id); return true; } return false; }
public boolean performHeaderLongPress(View view, long id) { boolean handled = false; if (mOnHeaderLongClickListener != null) { handled = mOnHeaderLongClickListener.onHeaderLongClick(this, view, id); } if (handled) { if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); } performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); } return handled; }
public boolean performItemLongClick(View view, int position, long id) { OnItemLongClickListener l = getOnItemLongClickListener(); if (l != null) { playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); l.onItemLongClick(this, view, position, id); } return true; } return false; }
private void dispatchOnDrawerClosed(View drawerView) { if ((openState & FLAG_IS_OPENED) == FLAG_IS_OPENED) { openState = 0; updateChildrenImportantForAccessibility(drawerView, false); // Only send WINDOW_STATE_CHANGE if the host has window focus. This // may change if support for multiple foreground windows (e.g. IME) // improves. if (parent.hasWindowFocus()) { final View rootView = parent.getRootView(); if (rootView != null) { rootView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); } } } }
private boolean performPinnedItemClick() { if (mPinnedSection == null) return false; OnItemClickListener listener = getOnItemClickListener(); if (listener != null && getAdapter().isEnabled(mPinnedSection.position)) { View view = mPinnedSection.view; playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } listener.onItemClick(this, view, mPinnedSection.position, mPinnedSection.id); return true; } return false; }
private boolean performPinnedItemClick() { if (mPinnedSection == null) return false; OnItemClickListener listener = getOnItemClickListener(); if (listener != null && getAdapter().isEnabled(mPinnedSection.position)) { View view = mPinnedSection.view; playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } listener.onItemClick(this, view, mPinnedSection.position, mPinnedSection.id); return true; } return false; }