HierarchyViewer cant't inspect layout in PopupWindow

六月ゝ 毕业季﹏ 提交于 2019-12-13 07:13:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!