Last active
January 5, 2016 08:53
-
-
Save olivierperez/315b0b2dc682bbaf1d6a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void debug(int level, ViewGroup view) { | |
for (int childIndex = 0; childIndex < view.getChildCount(); childIndex++) { | |
View child = view.getChildAt(childIndex); | |
String tab = ""; | |
for (int x = 0; x < level; x++) { | |
tab += " "; | |
} | |
Log.d("XXXXXXXXXXX", tab + child.getClass() + " | " + child.getId()); | |
if (child instanceof ViewGroup) { | |
debug(level + 1, (ViewGroup) child); | |
} | |
Log.d("XXXXXXXXXXX", tab + "! " + child.getClass()); | |
} | |
} | |
/* From Activity | |
debug(0, (ViewGroup) findViewById(android.R.id.content)); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment