-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drill into viewHierarchyState #14
Comments
(i ended up just doing it manually but still think it'd be cool to make this generic) |
This sounds like a nice idea for an improvement, thank you. How did you tackle this manually? and if you had to make it generic how would you go about it? The first idea springs to my mind is to make the tool print a kind of tree, that shows each "sub- You know, now I come to think of it (this is going back a while so I could be wrong) I think the big bit of state I was looking for that prompted me to make this tool was actually nested inside a fragment's arguments and I did some manual extra work to identify the root cause then as well. I guess I did something like: // Manually added in onCreate of offending fragment:
TooLargeTool.logBundleBreakdown(TAG, getArguments()); Obviously I was sick of the whole thing by then and didn't follow up with a proper generic solution! But maybe we can now? |
Here's what I ended up doing:
I think it would make sense to just auto-expand keys above a certain size, but I'd have to do some tinkering to figure out how to detect the type of thing ( |
You can use We have As a preliminary step I might introduce a type to better represent these tree structures because |
This library is great!
I'd like to figure out what part of the viewHierarchyState is taking up so much room. Any thoughts on how to best allow drilling-down in a situation like this? I could specify keys that I want to be drilled-down into when I call
TooLargeTool.startLogging(this)
? Or we could automatically drill down into the keys above a certain size? Happy to put together a PR if you give me some guidance on what approach(es) you'd be ok with.The text was updated successfully, but these errors were encountered: