一次性把一个页面的所有控件的属性全部打出来保存好文件

免得每次用那个布局分析跟焊接电路似的小心翼翼

function oncedone(widget,level){
indent = new Array(level).join(' ');

for(var i = 0; i < widget.childCount(); i++){
	child = widget.child(i);
	log(indent + child.className() + ', ' + child.id() + ' ' + child.depth() + ', ' + child.indexInParent() + ', ' + child.getText());
	if (child.childCount() > 0) oncedone(child,level+1);
}

}

oncedone(className("android.widget.FrameLayout").findOnce(),0);

function oncedone(widget){
	
	for(var i = 0; i < widget.childCount(); i++){
		child = widget.child(i);
		level = child.depth();
		indent = new Array(level).join('    '); 
		log(indent + child.className() + ', ' + child.id() + ' ' + level + ', ' + child.indexInParent() + ', ' + child.getText());
		if (child.childCount() > 0) oncedone(child);
	}
}

oncedone(className("android.widget.FrameLayout").findOnce());