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


Java AccessibilityNodeInfo.isClickable方法代码示例

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


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

示例1: iteratorSMZDM

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
private void iteratorSMZDM(AccessibilityNodeInfo info) {
    if (info.getChildCount() == 0 && info.getText() != null) {
        if (info.getText().equals("签到")) {
            AccessibilityNodeInfo parent = info.getParent();
            if ("android.widget.RelativeLayout".equals(parent.getClassName())
                    && parent.isClickable()) {
                parent.performAction(AccessibilityNodeInfo.ACTION_CLICK);
                found = true;
                return;
            }
        }
    } else {
        for (int i = 0; i < info.getChildCount(); i++) {
            if(info.getChild(i)!=null){
                if (found) {
                    found = false;
                    break;
                }
                iteratorSMZDM(info.getChild(i));
            }
        }
    }
    return ;
}
 
开发者ID:Sl0v3C,项目名称:Android_AutoSignInTool,代码行数:25,代码来源:autoSignInSMZDM.java

示例2: iterator

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
private void iterator(AccessibilityNodeInfo info, AccessibilityService service) {
    if (info.getText() != null) {
        if (info.getText().equals("签到") && info.isClickable()) {
            info.performAction(AccessibilityNodeInfo.ACTION_CLICK);
            delay(3000);
            iterator(service.getRootInActiveWindow(), service);
            found = true;
            return;
        }
    } else {
        for (int i = 0; i < info.getChildCount(); i++) {
            if(info.getChild(i)!=null){
                if (found) {
                    found = false;
                    break;
                }
                iterator(info.getChild(i), service);
            }
        }
    }
    return ;
}
 
开发者ID:Sl0v3C,项目名称:Android_AutoSignInTool,代码行数:23,代码来源:autoSignInTXDM.java

示例3: iteratorTXDM

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
private void iteratorTXDM(AccessibilityNodeInfo info, AccessibilityService service) {
    List<AccessibilityNodeInfo> node  = info.findAccessibilityNodeInfosByViewId("com.qq.ac.android:id/tab_layout_center");
    if (node != null) {
        AccessibilityNodeInfo find = node.get(0);
        if ("android.widget.RelativeLayout".equals(find.getClassName())
                && find.isClickable()) {
            find.performAction(AccessibilityNodeInfo.ACTION_CLICK);
            delay(3000);
            iterator(service.getRootInActiveWindow(), service);
            found = true;
            return;
        }

    } else {
        for (int i = 0; i < info.getChildCount(); i++) {
            if(info.getChild(i)!=null){
                if (found) {
                    found = false;
                    break;
                }
                iteratorTXDM(info.getChild(i), service);
            }
        }
    }
    return ;
}
 
开发者ID:Sl0v3C,项目名称:Android_AutoSignInTool,代码行数:27,代码来源:autoSignInTXDM.java

示例4: simulationClick

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private void simulationClick(AccessibilityEvent event, String text){
    List<AccessibilityNodeInfo> nodeInfoList = event.getSource().findAccessibilityNodeInfosByText(text);
    Log.d(TAG,"simulationClick "+nodeInfoList.size());
    for (AccessibilityNodeInfo node : nodeInfoList) {

        if (node.isClickable() && node.isEnabled()) {
            node.performAction(AccessibilityNodeInfo.ACTION_CLICK);

        }
    }
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:12,代码来源:RobService.java

示例5: iteratorJD

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
private void iteratorJD(AccessibilityNodeInfo info) {
    if (info.getText() != null) {
        if (info.getText().toString().contains("会员") && !info.getText().equals("PLUS会员")) {
            AccessibilityNodeInfo parent = info.getParent();
            if ("android.widget.RelativeLayout".equals(parent.getClassName())
                    && parent.isClickable()) {
                parent.performAction(AccessibilityNodeInfo.ACTION_CLICK);
                found = true;
                return ;
            }
        }
        if (info.getText().equals("签到")
                && info.findAccessibilityNodeInfosByViewId("com.jd.lib.coupon:id/sign_get_button") != null
                && info.isClickable()) {
            info.performAction(AccessibilityNodeInfo.ACTION_CLICK);
            found = true;
            return;
        }
    } else {
        for (int i = 0; i < info.getChildCount(); i++) {
            if(info.getChild(i)!=null){
                if (found) {
                    found  = false;
                    break;
                }
                iteratorJD(info.getChild(i));
            }
        }
    }
    return ;
}
 
开发者ID:Sl0v3C,项目名称:Android_AutoSignInTool,代码行数:32,代码来源:autoSignInJD.java

示例6: getClickableNode

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
/**
 * 获取一个可以点击的节点
 */
private AccessibilityNodeInfo getClickableNode(AccessibilityNodeInfo node){
	AccessibilityNodeInfo parent=node;
	while(parent!=null){
		if(parent.isClickable()){
			break;
		}
		parent=parent.getParent();
	}
	return parent;
}
 
开发者ID:qq1198,项目名称:mtoolbox,代码行数:14,代码来源:HongBaoService.java

示例7: recycle

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
public void recycle(AccessibilityNodeInfo info) {
    try {
        if (info.getChildCount() == 0) {
            if (info.getText() != null) {
                if ("领取红包".equals(info.getText().toString())) {
                    if (info.isClickable()) {
                        info.performAction(AccessibilityNodeInfo.ACTION_CLICK);
                    }
                    AccessibilityNodeInfo parent = info.getParent();
                    while (parent != null) {
                        if (parent.isClickable()) {
                            parents.add(parent);
                            break;
                        }
                        parent = parent.getParent();
                    }
                }
            }
        } else {
            for (int i = 0; i < info.getChildCount(); i++) {
                if (info.getChild(i) != null) {
                    recycle(info.getChild(i));
                }
            }
        }
    } catch (Exception e) {


    }
}
 
开发者ID:stytooldex,项目名称:stynico,代码行数:31,代码来源:Air.java

示例8: getClickableNode

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
/**
    * 获取一个可以点击的节点
    */
   private AccessibilityNodeInfo getClickableNode(AccessibilityNodeInfo node)
   {
AccessibilityNodeInfo parent=node;
while (parent != null)
{
    if (parent.isClickable())
    {
	break;
    }
    parent = parent.getParent();
}
return parent;
   }
 
开发者ID:stytooldex,项目名称:stynico,代码行数:17,代码来源:dex_smali.java

示例9: performClick

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
/**
 * 点击事件
 */
public static void performClick(AccessibilityNodeInfo nodeInfo) {
    if (nodeInfo == null) {
        return;
    }
    if (nodeInfo.isClickable()) {
        nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK);
    } else {
        performClick(nodeInfo.getParent());
    }
}
 
开发者ID:kaixuanluo,项目名称:pc-android-controller-android,代码行数:14,代码来源:AccessUtil.java

示例10: parseNodeInfoAndOpenGetPacketDialog

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
private void parseNodeInfoAndOpenGetPacketDialog(AccessibilityNodeInfo accessibilityNodeInfo){
    if(accessibilityNodeInfo != null && accessibilityNodeInfo.getChildCount() >0){
        for(int i = 0;i<accessibilityNodeInfo.getChildCount();i++){
            AccessibilityNodeInfo child = accessibilityNodeInfo.getChild(i);
            parseNodeInfoAndOpenGetPacketDialog(child);
        }
    }else{
        if(accessibilityNodeInfo != null && !TextUtils.isEmpty(accessibilityNodeInfo.getText())&&accessibilityNodeInfo.getText().toString().contains("领取红包")){
            Log.i(TAG,"领取红包");
            if(accessibilityNodeInfo.isClickable()){
                accessibilityNodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK);
            }else{
                AccessibilityNodeInfo parent  = accessibilityNodeInfo.getParent();
                while(parent != null ){
                    if(parent.isClickable()){
                        parent.performAction(AccessibilityNodeInfo.ACTION_CLICK);
                        break;
                    }

                    parent = parent.getParent();
                    Log.i(TAG," 找到一个可以点击的节点");
                }



            }

        }
    }

}
 
开发者ID:WanAndroid,项目名称:GetRedPackets,代码行数:32,代码来源:GetRedPacketService.java

示例11: doClick

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
/**
 * 執行點擊
 *
 * @param infos
 */
private void doClick(List<AccessibilityNodeInfo> infos) {
    if (infos != null)
        for (AccessibilityNodeInfo info : infos) {
            if (info.isEnabled() && info.isClickable()) {
                Log.i(TAG, "> doClick: " + info.getText());
                info.performAction(AccessibilityNodeInfo.ACTION_CLICK);
            }

        }
}
 
开发者ID:qoli,项目名称:MiHomePlus,代码行数:16,代码来源:MyAccessibility.java

示例12: performClick

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
/** 点击事件 */
public static void performClick(AccessibilityNodeInfo nodeInfo) {
    if(nodeInfo == null) {
        return;
    }
    if(nodeInfo.isClickable()) {
        nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK);
    } else {
        performClick(nodeInfo.getParent());
    }
}
 
开发者ID:A-Miracle,项目名称:QiangHongBao,代码行数:12,代码来源:AccessibilityUtils.java

示例13: performClick

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
public static void performClick(AccessibilityNodeInfo nodeInfo) {
    if (nodeInfo == null) {
        return;
    }
    if (nodeInfo.isClickable()) {
        nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK);
    } else {
        performClick(nodeInfo.getParent());
    }
}
 
开发者ID:xmlxin,项目名称:ReplyMessage,代码行数:11,代码来源:PerformClickUtils.java

示例14: performClick

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
/**
 * 模拟点击(如果该节点不可点击,事件分发原理,尝试递归其所有parent节点)
 * @param nodeInfo
 */
public static void performClick(AccessibilityNodeInfo nodeInfo){
    if(nodeInfo == null) {
        return;
    }
    if(nodeInfo.isClickable()) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK);
        }
    } else {
        performClick(nodeInfo.getParent());
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:17,代码来源:AceHelper.java

示例15: findAndAccessAccessibilityNode

import android.view.accessibility.AccessibilityNodeInfo; //导入方法依赖的package包/类
public static boolean findAndAccessAccessibilityNode(AccessibilityNodeInfo info, String[] texts, boolean fuzzy) {
    if (texts != null) {
        for (String textItem : texts) {
            List<AccessibilityNodeInfo> nodes = info.findAccessibilityNodeInfosByText(textItem);
            if (nodes != null && !nodes.isEmpty()) {
                AccessibilityNodeInfo node;
                for (int i = 0; i < nodes.size(); i++) {
                    node = nodes.get(i);
                    BaseAccessibility.logPrint("find text=" + textItem + "  enable=" + node.isEnabled());
                    CharSequence text = node.getText();

                    if (!TextUtils.isEmpty(text)) {
                        if (textItem.equals(text.toString()) || (fuzzy && text.toString().contains(textItem))) {
                            if (node.isEnabled() && node.isClickable()) {
                                if (node.getClassName().equals("android.widget.Button")
                                        || node.getClassName().equals("android.widget.TextView")
                                        || node.getClassName().equals("android.widget.CheckBox")) {
                                    autoClickNumber++;
                                    return node.performAction(AccessibilityNodeInfo.ACTION_CLICK);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return false;
}
 
开发者ID:miLLlulei,项目名称:Accessibility,代码行数:30,代码来源:BaseAccessibility.java


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