本文整理汇总了Java中android.view.accessibility.AccessibilityManager.isTouchExplorationEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityManager.isTouchExplorationEnabled方法的具体用法?Java AccessibilityManager.isTouchExplorationEnabled怎么用?Java AccessibilityManager.isTouchExplorationEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.accessibility.AccessibilityManager
的用法示例。
在下文中一共展示了AccessibilityManager.isTouchExplorationEnabled方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onHover
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
@Override
public boolean onHover(View v, MotionEvent event) {
if (mPopup != null && mFromTouch) {
return false;
}
AccessibilityManager manager = (AccessibilityManager)
mAnchor.getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
if (manager.isEnabled() && manager.isTouchExplorationEnabled()) {
return false;
}
switch (event.getAction()) {
case MotionEvent.ACTION_HOVER_MOVE:
if (mAnchor.isEnabled() && mPopup == null) {
mAnchorX = (int) event.getX();
mAnchorY = (int) event.getY();
setPendingHandler(this);
}
break;
case MotionEvent.ACTION_HOVER_EXIT:
hide();
break;
}
return false;
}
示例2: isTouchExplorationEnabled
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
public static boolean isTouchExplorationEnabled(AccessibilityManager accessibilityManager) {
if (Build.VERSION.SDK_INT >= 14) {
return accessibilityManager.isTouchExplorationEnabled();
} else {
return false;
}
}
示例3: isAccessibilityModeEnabled
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
public static boolean isAccessibilityModeEnabled(Context context) {
TraceEvent.begin("DeviceClassManager::isAccessibilityModeEnabled");
AccessibilityManager manager = (AccessibilityManager)
context.getSystemService(Context.ACCESSIBILITY_SERVICE);
boolean enabled = manager != null && manager.isEnabled()
&& manager.isTouchExplorationEnabled();
TraceEvent.end("DeviceClassManager::isAccessibilityModeEnabled");
return enabled;
}
示例4: isAccessibilityEnabled
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
/**
* Checks to see that this device has accessibility and touch exploration enabled.
* @param context A {@link Context} instance.
* @return Whether or not accessibility and touch exploration are enabled.
*/
@CalledByNative
public static boolean isAccessibilityEnabled(Context context) {
AccessibilityManager manager = (AccessibilityManager)
context.getSystemService(Context.ACCESSIBILITY_SERVICE);
return manager != null && manager.isEnabled() && manager.isTouchExplorationEnabled();
}
示例5: isTouchExplorationEnabled
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
public static boolean isTouchExplorationEnabled(
AccessibilityManager accessibilityManager) {
if (Build.VERSION.SDK_INT >= 14) {
return accessibilityManager.isTouchExplorationEnabled();
} else {
return false;
}
}
示例6: AccessibilityInfoModule
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
public AccessibilityInfoModule(ReactApplicationContext context) {
super(context);
mAccessibilityManager = (AccessibilityManager) getReactApplicationContext()
.getSystemService(Context.ACCESSIBILITY_SERVICE);
mEnabled = mAccessibilityManager.isTouchExplorationEnabled();
if (Build.VERSION.SDK_INT >= 19) {
mTouchExplorationStateChangeListener = new ReactTouchExplorationStateChangeListener();
}
}
示例7: onInterceptHoverEvent
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
@Override
public boolean onInterceptHoverEvent(MotionEvent ev) {
if (mLauncher == null || mLauncher.getWorkspace() == null) {
return false;
}
Folder currentFolder = Folder.getOpen(mLauncher);
if (currentFolder == null) {
return false;
} else {
AccessibilityManager accessibilityManager = (AccessibilityManager)
getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
if (accessibilityManager.isTouchExplorationEnabled()) {
final int action = ev.getAction();
boolean isOverFolderOrSearchBar;
switch (action) {
case MotionEvent.ACTION_HOVER_ENTER:
isOverFolderOrSearchBar = isEventOverFolder(currentFolder, ev) ||
(isInAccessibleDrag() && isEventOverDropTargetBar(ev));
if (!isOverFolderOrSearchBar) {
sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
mHoverPointClosesFolder = true;
return true;
}
mHoverPointClosesFolder = false;
break;
case MotionEvent.ACTION_HOVER_MOVE:
isOverFolderOrSearchBar = isEventOverFolder(currentFolder, ev) ||
(isInAccessibleDrag() && isEventOverDropTargetBar(ev));
if (!isOverFolderOrSearchBar && !mHoverPointClosesFolder) {
sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
mHoverPointClosesFolder = true;
return true;
} else if (!isOverFolderOrSearchBar) {
return true;
}
mHoverPointClosesFolder = false;
}
}
}
return false;
}
示例8: isTouchExplorationEnabled
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
public static boolean isTouchExplorationEnabled(AccessibilityManager manager) {
return manager.isTouchExplorationEnabled();
}
示例9: onInterceptHoverEvent
import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
@Override
public boolean onInterceptHoverEvent(MotionEvent ev) {
if (mLauncher == null || mLauncher.getWorkspace() == null) {
return false;
}
Folder currentFolder = mLauncher.getWorkspace().getOpenFolder();
if (currentFolder == null) {
return false;
} else {
AccessibilityManager accessibilityManager = (AccessibilityManager)
getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
if (accessibilityManager.isTouchExplorationEnabled()) {
final int action = ev.getAction();
boolean isOverFolderOrSearchBar;
switch (action) {
case MotionEvent.ACTION_HOVER_ENTER:
isOverFolderOrSearchBar = isEventOverFolder(currentFolder, ev) ||
(isInAccessibleDrag() && isEventOverDropTargetBar(ev));
if (!isOverFolderOrSearchBar) {
sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
mHoverPointClosesFolder = true;
return true;
}
mHoverPointClosesFolder = false;
break;
case MotionEvent.ACTION_HOVER_MOVE:
isOverFolderOrSearchBar = isEventOverFolder(currentFolder, ev) ||
(isInAccessibleDrag() && isEventOverDropTargetBar(ev));
if (!isOverFolderOrSearchBar && !mHoverPointClosesFolder) {
sendTapOutsideFolderAccessibilityEvent(currentFolder.isEditingName());
mHoverPointClosesFolder = true;
return true;
} else if (!isOverFolderOrSearchBar) {
return true;
}
mHoverPointClosesFolder = false;
}
}
}
return false;
}