Java 类android.view.View.AccessibilityDelegate 实例源码

项目:talkback    文件:SwitchAccessEndToEndTest.java   
@MediumTest
public void testScrolling_scroll() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
        return;
    }

    final ScrollView scrollView = (ScrollView) getActivity().findViewById(R.id.scroll_id);
    final CountDownLatch scrollsMissed = new CountDownLatch(1);
    scrollView.setAccessibilityDelegate(new AccessibilityDelegate() {
        @Override
        public boolean performAccessibilityAction(@NonNull View host, int action, Bundle args) {
            if (action == AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD) {
                scrollsMissed.countDown();
            }
            return super.performAccessibilityAction(host, action, args);
        }
    });
    sendKeyEventSync(mMoveFocusEvent);
    sendKeyEventSync(mScrollForwardEvent);
    assertEquals(0, scrollsMissed.getCount());
}
项目:FMTech    文件:AccessibilityDelegateCompat.java   
public final AccessibilityNodeProviderCompat getAccessibilityNodeProvider(Object paramObject, View paramView)
{
  AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView);
  if (localAccessibilityNodeProvider != null) {
    return new AccessibilityNodeProviderCompat(localAccessibilityNodeProvider);
  }
  return null;
}
项目:FMTech    文件:ViewCompat.java   
public final void setAccessibilityDelegate(View paramView, AccessibilityDelegateCompat paramAccessibilityDelegateCompat)
{
  if (paramAccessibilityDelegateCompat == null) {}
  for (Object localObject = null;; localObject = paramAccessibilityDelegateCompat.mBridge)
  {
    paramView.setAccessibilityDelegate((View.AccessibilityDelegate)localObject);
    return;
  }
}
项目:FMTech    文件:nn.java   
public final void a(View paramView, ld paramld)
{
  if (paramld == null) {}
  for (Object localObject = null;; localObject = paramld.c)
  {
    paramView.setAccessibilityDelegate((View.AccessibilityDelegate)localObject);
    return;
  }
}
项目:FMTech    文件:lg.java   
public final qb a(Object paramObject, View paramView)
{
  AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView);
  if (localAccessibilityNodeProvider != null) {
    return new qb(localAccessibilityNodeProvider);
  }
  return null;
}
项目:365browser    文件:AutofillPopup.java   
/**
 * Filters the Autofill suggestions to the ones that we support and shows the popup.
 * @param suggestions Autofill suggestion data.
 * @param isRtl @code true if right-to-left text.
 * @param backgroundColor popup background color, or {@code Color.TRANSPARENT} if unspecified.
 * @param dividerColor color for divider between popup items, or {@code Color.TRANSPARENT} if
 * unspecified.
 * @param isBoldLabel true if suggestion label's type face is {@code Typeface.BOLD}, false if
 * suggestion label's type face is {@code Typeface.NORMAL}.
 * @param dropdownItemHeight height of each dropdown item in dimension independent pixel units,
 * 0 if unspecified.
 * @param margin Margin for icon, label and between icon and label in dimension independent
 * pixel units, 0 if not specified.
 */
@SuppressLint("InlinedApi")
public void filterAndShow(AutofillSuggestion[] suggestions, boolean isRtl,
        int backgroundColor, int dividerColor, int dropdownItemHeight, int margin) {
    mSuggestions = new ArrayList<AutofillSuggestion>(Arrays.asList(suggestions));
    // Remove the AutofillSuggestions with IDs that are not supported by Android
    ArrayList<DropdownItem> cleanedData = new ArrayList<DropdownItem>();
    HashSet<Integer> separators = new HashSet<Integer>();
    for (int i = 0; i < suggestions.length; i++) {
        int itemId = suggestions[i].getSuggestionId();
        if (itemId == ITEM_ID_SEPARATOR_ENTRY) {
            separators.add(cleanedData.size());
        } else {
            cleanedData.add(suggestions[i]);
        }
    }

    setAdapter(new DropdownAdapter(mContext, cleanedData, separators,
            backgroundColor == Color.TRANSPARENT ? null : backgroundColor,
            dividerColor == Color.TRANSPARENT ? null : dividerColor,
            dropdownItemHeight == 0 ? null : dropdownItemHeight,
            margin == 0 ? null : margin));
    setRtl(isRtl);
    show();
    getListView().setOnItemLongClickListener(this);
    getListView().setAccessibilityDelegate(new AccessibilityDelegate() {
        @Override
        public boolean onRequestSendAccessibilityEvent(
                ViewGroup host, View child, AccessibilityEvent event) {
            getListView().removeCallbacks(mClearAccessibilityFocusRunnable);
            if (event.getEventType()
                    == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED) {
                getListView().postDelayed(
                        mClearAccessibilityFocusRunnable, CLEAR_ACCESSIBILITY_FOCUS_DELAY_MS);
            }
            return super.onRequestSendAccessibilityEvent(host, child, event);
        }
    });
}
项目:WalkersGuide-Android    文件:RouterFragment.java   
@Override public void onAttach(Activity activity) {
    super.onAttach(activity);
    if (globalData == null) {
        globalData = ((Globals) getActivity().getApplicationContext());
    }
    settingsManager = globalData.getSettingsManagerInstance();
    poiManager = globalData.getPOIManagerInstance();
    positionManager = globalData.getPositionManagerInstance();
    sensorsManager = globalData.getSensorsManagerInstance();
    addressManager = globalData.getAddressManagerInstance();
    keyboardManager = globalData.getKeyboardManagerInstance();
    ttsInstance = globalData.getTTSInstance();
    vibrator = (Vibrator) getActivity().getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE);
    processedPOIList = new ArrayList<Point>();
    mHandler = new Handler();
    routeSimulator = new RouteSimulator();
    gpsStatusHandler = new Handler();
    gpsStatusUpdater = new GPSStatusUpdater();
    focusedElement = UIElement.DEFAULT;
    defaultAccessibilityDelegate = new AccessibilityDelegate() {
        @Override public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) {
            super.onPopulateAccessibilityEvent(host, event);
            if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
                focusedElement = UIElement.DEFAULT;
            }
        }
    };
    // This makes sure that the container activity has implemented
    // the callback interface. If not, it throws an exception
    try {
        mRouterFListener = (MessageFromRouterFragmentListener) ((MainActivity) activity).getMessageFromRouterFragmentListener();
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString()
                + " must implement MessageFromRouterFragmentListener");
    }
}
项目:ingress-indonesia-dev    文件:e.java   
public final android.support.v4.view.a.f a(Object paramObject, View paramView)
{
  AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView);
  if (localAccessibilityNodeProvider != null)
    return new android.support.v4.view.a.f(localAccessibilityNodeProvider);
  return null;
}
项目:LaunchEnr    文件:BaseActivity.java   
public AccessibilityDelegate getAccessibilityDelegate() {
    return null;
}
项目:letv    文件:ViewCompatICS.java   
public static void setAccessibilityDelegate(View v, @Nullable Object delegate) {
    v.setAccessibilityDelegate((AccessibilityDelegate) delegate);
}
项目:AndroidViewHelper    文件:ViewWrapper.java   
/**
* @see View#setAccessibilityDelegate(AccessibilityDelegate)
*/
 public W setAccessibilityDelegate(AccessibilityDelegate delegate) {
     mView.setAccessibilityDelegate(delegate);
     return (W)this;
 }
项目:boohee_v5.6    文件:MonthView.java   
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
    if (!this.mLockAccessibilityDelegate) {
        super.setAccessibilityDelegate(delegate);
    }
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatJellyBean.java   
public static Object getAccessibilityNodeProvider(Object delegate, View host) {
    return ((AccessibilityDelegate) delegate).getAccessibilityNodeProvider(host);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatJellyBean.java   
public static boolean performAccessibilityAction(Object delegate, View host, int action, Bundle args) {
    return ((AccessibilityDelegate) delegate).performAccessibilityAction(host, action, args);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static Object newAccessibilityDelegateDefaultImpl() {
    return new AccessibilityDelegate();
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static boolean dispatchPopulateAccessibilityEvent(Object delegate, View host, AccessibilityEvent event) {
    return ((AccessibilityDelegate) delegate).dispatchPopulateAccessibilityEvent(host, event);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static void onInitializeAccessibilityEvent(Object delegate, View host, AccessibilityEvent event) {
    ((AccessibilityDelegate) delegate).onInitializeAccessibilityEvent(host, event);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static void onInitializeAccessibilityNodeInfo(Object delegate, View host, Object info) {
    ((AccessibilityDelegate) delegate).onInitializeAccessibilityNodeInfo(host, (AccessibilityNodeInfo) info);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static void onPopulateAccessibilityEvent(Object delegate, View host, AccessibilityEvent event) {
    ((AccessibilityDelegate) delegate).onPopulateAccessibilityEvent(host, event);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static boolean onRequestSendAccessibilityEvent(Object delegate, ViewGroup host, View child, AccessibilityEvent event) {
    return ((AccessibilityDelegate) delegate).onRequestSendAccessibilityEvent(host, child, event);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static void sendAccessibilityEvent(Object delegate, View host, int eventType) {
    ((AccessibilityDelegate) delegate).sendAccessibilityEvent(host, eventType);
}
项目:boohee_v5.6    文件:AccessibilityDelegateCompatIcs.java   
public static void sendAccessibilityEventUnchecked(Object delegate, View host, AccessibilityEvent event) {
    ((AccessibilityDelegate) delegate).sendAccessibilityEventUnchecked(host, event);
}
项目:boohee_v5.6    文件:ViewCompatICS.java   
public static void setAccessibilityDelegate(View v, @Nullable Object delegate) {
    v.setAccessibilityDelegate((AccessibilityDelegate) delegate);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static Object m1322a() {
    return new AccessibilityDelegate();
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1324a(Object obj, View view, int i) {
    ((AccessibilityDelegate) obj).sendAccessibilityEvent(view, i);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1325a(Object obj, View view, Object obj2) {
    ((AccessibilityDelegate) obj).onInitializeAccessibilityNodeInfo(view, (AccessibilityNodeInfo) obj2);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static boolean m1326a(Object obj, View view, AccessibilityEvent accessibilityEvent) {
    return ((AccessibilityDelegate) obj).dispatchPopulateAccessibilityEvent(view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static boolean m1327a(Object obj, ViewGroup viewGroup, View view, AccessibilityEvent accessibilityEvent) {
    return ((AccessibilityDelegate) obj).onRequestSendAccessibilityEvent(viewGroup, view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1328b(Object obj, View view, AccessibilityEvent accessibilityEvent) {
    ((AccessibilityDelegate) obj).onInitializeAccessibilityEvent(view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1329c(Object obj, View view, AccessibilityEvent accessibilityEvent) {
    ((AccessibilityDelegate) obj).onPopulateAccessibilityEvent(view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1330d(Object obj, View view, AccessibilityEvent accessibilityEvent) {
    ((AccessibilityDelegate) obj).sendAccessibilityEventUnchecked(view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:cl.java   
public static void m1154a(View view, Object obj) {
    view.setAccessibilityDelegate((AccessibilityDelegate) obj);
}
项目:solved-hacking-problem    文件:C0159k.java   
public static Object m1332a(Object obj, View view) {
    return ((AccessibilityDelegate) obj).getAccessibilityNodeProvider(view);
}
项目:solved-hacking-problem    文件:C0159k.java   
public static boolean m1333a(Object obj, View view, int i, Bundle bundle) {
    return ((AccessibilityDelegate) obj).performAccessibilityAction(view, i, bundle);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static Object m1322a() {
    return new AccessibilityDelegate();
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1324a(Object obj, View view, int i) {
    ((AccessibilityDelegate) obj).sendAccessibilityEvent(view, i);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1325a(Object obj, View view, Object obj2) {
    ((AccessibilityDelegate) obj).onInitializeAccessibilityNodeInfo(view, (AccessibilityNodeInfo) obj2);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static boolean m1326a(Object obj, View view, AccessibilityEvent accessibilityEvent) {
    return ((AccessibilityDelegate) obj).dispatchPopulateAccessibilityEvent(view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static boolean m1327a(Object obj, ViewGroup viewGroup, View view, AccessibilityEvent accessibilityEvent) {
    return ((AccessibilityDelegate) obj).onRequestSendAccessibilityEvent(viewGroup, view, accessibilityEvent);
}
项目:solved-hacking-problem    文件:C0157h.java   
public static void m1328b(Object obj, View view, AccessibilityEvent accessibilityEvent) {
    ((AccessibilityDelegate) obj).onInitializeAccessibilityEvent(view, accessibilityEvent);
}