问题
I'm using ViewServer to inspect layout in my app.I click a button and it shows a PopupWindow
as Dropdown. But I can't see the popup window layout in HierarchyViewer
.
Any help?
回答1:
After showing the window, add the below statement and relaunch HierarchyViewer. It should show a your pop window contents.
ViewServer.get(context).addWindow(popupWindow.getContentView(), "popup");
On your onDismissListener, add the following statement to remove the views from hierarchyviewer.
ViewServer.get(context).removeWindow(window.getContentView());
来源:https://stackoverflow.com/questions/24180999/hierarchyviewer-cantt-inspect-layout-in-popupwindow