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


Java AccessibilityManager.isTouchExplorationEnabled方法代码示例

本文整理汇总了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;
}
 
开发者ID:commonsguy,项目名称:cwac-crossport,代码行数:26,代码来源:TooltipCompatHandler.java

示例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;
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:Utils.java

示例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;
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:10,代码来源:DeviceClassManager.java

示例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();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:12,代码来源:AccessibilityUtil.java

示例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;
    }
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:9,代码来源:Utils.java

示例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();
    }
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:10,代码来源:AccessibilityInfoModule.java

示例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;
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:42,代码来源:DragLayer.java

示例8: isTouchExplorationEnabled

import android.view.accessibility.AccessibilityManager; //导入方法依赖的package包/类
public static boolean isTouchExplorationEnabled(AccessibilityManager manager) {
    return manager.isTouchExplorationEnabled();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityManagerCompatIcs.java

示例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;
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:42,代码来源:DragLayer.java


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