-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Detect all Android windows #325
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
Conversation
* Adds support for dialogs (child windows of an activity) as well as any window manually added to the window manager. * Added a dialog and a fake chathead to the sample This is a WIP: works alongside the existing mechanism, so reporting is duplicated. Fixes facebook#295
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Oh nice! I'll start looking at this ... |
/** | ||
* Looks for all Root views | ||
*/ | ||
public List<View> findAllRootViews() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the Allocator
pattern instead of returning a List, which will help avoid allocations
Okay there's my first round of code review comments on the stetho side. I haven't looked at much of the stetho-sample additions yet. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks for the feedback, I'll try to fix the styling issues tomorrow. |
Where are we at with this diff? |
Haven't found time to work on this. |
Closing to clean up our queue |
so... still not support dialog? |
Fixes #295
DO NOT MERGE, this is a WIP: works alongside the existing mechanism, so reporting is duplicated.
More context
The way Stetho currently works is incorrect: it assumes that there is only ever one window per activity, and that activities are the only source of windows. It recently added support for dialog fragments, but dialog fragments are just (bad) wrappers around real dialogs, and Stetho currently does not support normal dialogs. At the end of the day, a dialog is just a fancy window.
An application can spawn any number of windows, regardless of activities running.
I'm opening this PR to discuss the way forward, see what we can do to reunite the two approaches.