Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Conversation

pyricau
Copy link

@pyricau pyricau commented Jan 6, 2016

  • 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

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.

screenshot-2016-01-06_13 47 08 388_framed

screen shot 2016-01-06 at 1 48 06 pm

* 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
@facebook-github-bot
Copy link

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!

@rickbrew
Copy link
Contributor

rickbrew commented Jan 6, 2016

Oh nice! I'll start looking at this ...

/**
* Looks for all Root views
*/
public List<View> findAllRootViews() {
Copy link
Contributor

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

@rickbrew
Copy link
Contributor

rickbrew commented Jan 6, 2016

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.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@pyricau
Copy link
Author

pyricau commented Jan 6, 2016

Thanks for the feedback, I'll try to fix the styling issues tomorrow.

@jasta
Copy link
Contributor

jasta commented Feb 11, 2016

Where are we at with this diff?

@pyricau
Copy link
Author

pyricau commented Feb 16, 2016

Haven't found time to work on this.

@jasta
Copy link
Contributor

jasta commented Dec 29, 2017

Closing to clean up our queue

@jasta jasta closed this Dec 29, 2017
@SR1s
Copy link

SR1s commented Jul 19, 2018

so... still not support dialog?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants