boolean (TreeNode rootNode) { int count = rootNode.getChildCount(); for (int i = 0; i < count; i++) { TreeNode child = rootNode.getChildAt(i); if (child.getChildCount() > 0) { return true; } } return false; }