本文整理匯總了Java中android.view.accessibility.AccessibilityEvent.TYPE_VIEW_HOVER_ENTER屬性的典型用法代碼示例。如果您正苦於以下問題:Java AccessibilityEvent.TYPE_VIEW_HOVER_ENTER屬性的具體用法?Java AccessibilityEvent.TYPE_VIEW_HOVER_ENTER怎麽用?Java AccessibilityEvent.TYPE_VIEW_HOVER_ENTER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類android.view.accessibility.AccessibilityEvent
的用法示例。
在下文中一共展示了AccessibilityEvent.TYPE_VIEW_HOVER_ENTER屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onAccessibilityEvent
@Override
public void onAccessibilityEvent(final AccessibilityEvent event) {
Log.v(TAG, "onAccessibilityEvent: " + event);
if (!containsAllEventTypes && !eventTypes.contains(event.getEventType()))
return;
int type = event.getEventType();
if (type == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED || type == AccessibilityEvent.TYPE_VIEW_HOVER_ENTER
|| type == AccessibilityEvent.TYPE_VIEW_HOVER_EXIT) {
mFastRootInActiveWindow = super.getRootInActiveWindow();
}
for (Map.Entry<Integer, AccessibilityDelegate> entry : mDelegates.entrySet()) {
AccessibilityDelegate delegate = entry.getValue();
Set<Integer> types = delegate.getEventTypes();
if (types != null && !delegate.getEventTypes().contains(event.getEventType()))
continue;
long start = System.currentTimeMillis();
if (delegate.onAccessibilityEvent(AccessibilityService.this, event))
break;
Log.v(TAG, "millis: " + (System.currentTimeMillis() - start) + " delegate: " + entry.getValue().getClass().getName());
}
}
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:21,代碼來源:AccessibilityService.java