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


Java AccessibilityEvent.TYPE_VIEW_SCROLLED属性代码示例

本文整理汇总了Java中android.view.accessibility.AccessibilityEvent.TYPE_VIEW_SCROLLED属性的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityEvent.TYPE_VIEW_SCROLLED属性的具体用法?Java AccessibilityEvent.TYPE_VIEW_SCROLLED怎么用?Java AccessibilityEvent.TYPE_VIEW_SCROLLED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.view.accessibility.AccessibilityEvent的用法示例。


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

示例1: sendAccessibilityEvent

@Override
public void sendAccessibilityEvent(int eventType) {
    // Don't let the view send real scroll events.
    if (eventType != AccessibilityEvent.TYPE_VIEW_SCROLLED) {
        super.sendAccessibilityEvent(eventType);
    }
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:7,代码来源:PagedView.java

示例2: onInitializeAccessibilityEvent

@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED) {
        event.setFromIndex(0);
        event.setToIndex(0);
    }
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:8,代码来源:YearPickerView.java

示例3: onServiceConnected

@Override
    public void onServiceConnected() {
        AccessibilityServiceInfo info = getServiceInfo();
        info.eventTypes = AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED |
                AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
                | AccessibilityEvent.TYPE_VIEW_SCROLLED
                | AccessibilityEvent.TYPE_VIEW_CLICKED;

        info.packageNames = packages;

        info.feedbackType = AccessibilityServiceInfo.FEEDBACK_SPOKEN;

        info.notificationTimeout = 100;

        ReflectUtils.setFieldValue(info, "mCapabilities", info.getCapabilities() | AccessibilityServiceInfo.CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT);

        this.setServiceInfo(info);

        BaseAccessibility.isEnable.set(true);
        if (needClearTask) {
            InstallAccessibility.openSettingAccessibilityNeedTips(this);
            MyAccessibility.needClearTask = false;
            LocalAccessibilityManager.getInstance().notifyAccessibilityChanged(true);
        }

//        StatHelper.onSmartInstallEvent(StatFieldConst.SmartInstaller.Action.ACTION_SMARTINSC);
        LogUtils.d("BaseAccessibility", "onServiceConnected:" + BaseAccessibility.isEnable.get());

        SmartInstaller.logPrint("processAccessibilityEnvent onServiceConnected= " + BaseAccessibility.isEnable.get()
                + " autoClickNumber=" + BaseAccessibility.autoClickNumber);
    }
 
开发者ID:miLLlulei,项目名称:Accessibility,代码行数:31,代码来源:MyAccessibility.java

示例4: onAccessibilityEvent

@Override
public void onAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
    fgPackageName = accessibilityEvent.getPackageName().toString();
    //prt("Event: " + accessibilityEvent);
    if (accessibilityEvent.getEventType() == AccessibilityEvent.TYPE_VIEW_CLICKED) {
        if ("com.jd.jrapp".equals(fgPackageName) && (!accessibilityEvent.getText().toString().equals("签到")
                && !accessibilityEvent.getText().toString().equals("钢蹦明细")
                && accessibilityEvent.getClassName().equals("android.widget.Button"))) {
            //prt("" + accessibilityEvent);
            autoLock.lock();
            autoCondition.signal();
            autoLock.unlock();
        }

        if ("com.jingdong.app.mall".equals(fgPackageName)
                && !(accessibilityEvent.getText().toString().contains("领京豆")
                || accessibilityEvent.getText().toString().contains("我的")
                || accessibilityEvent.getText().toString().contains("会员")
                || accessibilityEvent.getText().toString().contains("惠赚钱")
                || accessibilityEvent.getText().toString().contains("签到")
                || accessibilityEvent.getText().toString().contains("领券"))) {
            prt(" " + accessibilityEvent);
            autoLock.lock();
            autoCondition.signal();
            autoLock.unlock();
        }
    }

    if (accessibilityEvent.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED
            && "com.jd.jrapp".equals(fgPackageName) && jdf.gestureLockFlag) {
        //prt("" + accessibilityEvent);
        jdf.gestureLockFlag = false;
        autoLock.lock();
        autoCondition.signal();
        autoLock.unlock();
    }

    //prt(oldPackageName + " ------------------------- " + fgPackageName);
    if (!oldPackageName.equals(fgPackageName)) {
        new autoSignThread(accessibilityEvent).start();
    }
    oldPackageName = fgPackageName;
}
 
开发者ID:Sl0v3C,项目名称:Android_AutoSignInTool,代码行数:43,代码来源:SignInService.java


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