当前位置: 首页>>代码示例>>Java>>正文


Java AccessibilityDelegate类代码示例

本文整理汇总了Java中android.view.View.AccessibilityDelegate的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityDelegate类的具体用法?Java AccessibilityDelegate怎么用?Java AccessibilityDelegate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AccessibilityDelegate类属于android.view.View包,在下文中一共展示了AccessibilityDelegate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testScrolling_scroll

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
@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());
}
 
开发者ID:google,项目名称:talkback,代码行数:22,代码来源:SwitchAccessEndToEndTest.java

示例2: getAccessibilityNodeProvider

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public final AccessibilityNodeProviderCompat getAccessibilityNodeProvider(Object paramObject, View paramView)
{
  AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView);
  if (localAccessibilityNodeProvider != null) {
    return new AccessibilityNodeProviderCompat(localAccessibilityNodeProvider);
  }
  return null;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:9,代码来源:AccessibilityDelegateCompat.java

示例3: setAccessibilityDelegate

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public final void setAccessibilityDelegate(View paramView, AccessibilityDelegateCompat paramAccessibilityDelegateCompat)
{
  if (paramAccessibilityDelegateCompat == null) {}
  for (Object localObject = null;; localObject = paramAccessibilityDelegateCompat.mBridge)
  {
    paramView.setAccessibilityDelegate((View.AccessibilityDelegate)localObject);
    return;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:10,代码来源:ViewCompat.java

示例4: a

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public final void a(View paramView, ld paramld)
{
  if (paramld == null) {}
  for (Object localObject = null;; localObject = paramld.c)
  {
    paramView.setAccessibilityDelegate((View.AccessibilityDelegate)localObject);
    return;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:10,代码来源:nn.java

示例5: a

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public final qb a(Object paramObject, View paramView)
{
  AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView);
  if (localAccessibilityNodeProvider != null) {
    return new qb(localAccessibilityNodeProvider);
  }
  return null;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:9,代码来源:lg.java

示例6: filterAndShow

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
/**
 * 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);
        }
    });
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:53,代码来源:AutofillPopup.java

示例7: onAttach

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
@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");
    }
}
 
开发者ID:scheibler,项目名称:WalkersGuide-Android,代码行数:37,代码来源:RouterFragment.java

示例8: a

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
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;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:8,代码来源:e.java

示例9: getAccessibilityDelegate

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public AccessibilityDelegate getAccessibilityDelegate() {
    return null;
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:4,代码来源:BaseActivity.java

示例10: setAccessibilityDelegate

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public static void setAccessibilityDelegate(View v, @Nullable Object delegate) {
    v.setAccessibilityDelegate((AccessibilityDelegate) delegate);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:ViewCompatICS.java

示例11: setAccessibilityDelegate

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
/**
* @see View#setAccessibilityDelegate(AccessibilityDelegate)
*/
 public W setAccessibilityDelegate(AccessibilityDelegate delegate) {
     mView.setAccessibilityDelegate(delegate);
     return (W)this;
 }
 
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:8,代码来源:ViewWrapper.java

示例12: setAccessibilityDelegate

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
    if (!this.mLockAccessibilityDelegate) {
        super.setAccessibilityDelegate(delegate);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:6,代码来源:MonthView.java

示例13: getAccessibilityNodeProvider

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public static Object getAccessibilityNodeProvider(Object delegate, View host) {
    return ((AccessibilityDelegate) delegate).getAccessibilityNodeProvider(host);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityDelegateCompatJellyBean.java

示例14: performAccessibilityAction

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public static boolean performAccessibilityAction(Object delegate, View host, int action, Bundle args) {
    return ((AccessibilityDelegate) delegate).performAccessibilityAction(host, action, args);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityDelegateCompatJellyBean.java

示例15: newAccessibilityDelegateDefaultImpl

import android.view.View.AccessibilityDelegate; //导入依赖的package包/类
public static Object newAccessibilityDelegateDefaultImpl() {
    return new AccessibilityDelegate();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityDelegateCompatIcs.java


注:本文中的android.view.View.AccessibilityDelegate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。