private static boolean nafCheck(AccessibilityNodeInfo node) {
boolean isNaf = node.isClickable() && node.isEnabled()
&& safeCharSeqToString(node.getContentDescription()).isEmpty()
&& safeCharSeqToString(node.getText()).isEmpty();
if (! isNaf)
return true;
// check children since sometimes the containing element is clickable
// and NAF but a child's text or description is available. Will assume
// such layout as fine.
return childNafCheck(node);
}
在 uiautomator 的源码,AccessibilityNodeInfoDumper.java,上有个判断
把这部分修改了。是不是可以显示 textview 的 naf 属性为 True 时的内容?
可以用么?有人能帮我么?RMB 酬谢。