2016-11-10 20 views

回答

2

Android developer site有一個很好的例子。您可以嘗試:

AccessibilityNodeInfo source = event.getSource(); 
if (source == null) { 
    return; 
} 

// Grab the parent of the view that fired the event. 
AccessibilityNodeInfo rowNode = getListItemNodeInfo(source); 
if (rowNode == null) { 
    return; 
} 

for (int i = 0; i < rowNode.getChildCount(); i++) { 
    AccessibilityNodeInfo node = rowNode.getChild(i); 
    if ("TextView".eaquals(node.getClassName())) { 
     Log.i("text", node.getText()); 
    } 
} 
+0

感謝您的配合。我有另一個問題。我正在嘗試訪問webview的內容。這怎麼能實現? –

+0

你的意思是得到的HTML? – shhp

+0

是的。我需要html數據。 –

相關問題