private void traverse(View view) {
        if (view.getAlpha() == 0 || view.getVisibility() != View.VISIBLE) return;
        elements.add(new Element(view));
        if (view instanceof ViewGroup) {
            ViewGroup parent = (ViewGroup) view;
            for (int i = 0; i < parent.getChildCount(); i++) {
                traverse(parent.getChildAt(i));
            }
        }
    }
Created by linjiang on 09/06/2018.

https://github.com/eleme/UETool/
pandora-core/src/main/java/tech/linjiang/pandora/inspector/ElementHoldView.java