AlertDialog not showing in Hierarchy Viewer

I have a fragment-based application that I am trying to analyze using a hierarchy viewer. My problem is that the views I need for analysis are not displayed in the viewer, although they are clearly present in the emulator.

I have a FragmentActivity that launched a fragment. This snippet launched FragmentDialog using FragmentDialog.show (getActivity (). GetSupportFragmentManager (), "token"). This FragmentDialog launched AlertDialog using AlertDialog.show (). The FragmentDialog (full screen) is displayed on the emulator, and AlertDialog is visible above it.

The Hierarchy Control Panel displays my activity. If I select this and load the view hierarchy, I get the Fragment view hierarchy (which is not currently displayed on the emulator).

I note (see attached image) that in the Windows Hierarchy Viewer panel there are two blank lines located above my activity. I suspect they are related to my "missing" DialogFragment and AlertDialogs dialogs. Unfortunately, I am not allowed to select one of these blank lines to load their respective view hierarchies.

Any ideas on how I can get the names associated with these two windows, or otherwise make the Hierarchy Viewer interact with the display of their contents?

(An additional background, if I use the “Dump View Hierarchy” in terms of DDMS, the dump includes DialogFragment and AlertDialogs dialog boxes. Unfortunately, this tool does not provide internal data (layout options) that I need to figure out what is happening.)

Android Device Monitor Screenshot

Emulator screenshots

+4
source share

All Articles