{% setvar book_path %}/reference/kotlin/dokkatest/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
interface ViewDebug.HierarchyHandler
Allows a View to inject custom children into HierarchyViewer. For example,WebView uses this to add its internal layer tree as a child to itself
Public functions |
|
---|---|
Unit |
dumpViewHierarchyWithProperties(out: BufferedWriter, level: Int) Dumps custom children to hierarchy viewer.See ViewDebug.dumpViewWithProperties(Context, View, BufferedWriter, int)for the formatAn empty implementation should simply do nothing |
View |
findHierarchyView(className: String, hashCode: Int) Returns a View to enable grabbing screenshots from custom childrenreturned in dumpViewHierarchyWithProperties. |
fun dumpViewHierarchyWithProperties(out: BufferedWriter, level: Int): Unit
Dumps custom children to hierarchy viewer.See ViewDebug.dumpViewWithProperties(Context, View, BufferedWriter, int)for the formatAn empty implementation should simply do nothing
Parameters | |
---|---|
out: BufferedWriter |
The output writer |
level: Int |
The indentation level |
fun findHierarchyView(className: String, hashCode: Int): View
Returns a View to enable grabbing screenshots from custom childrenreturned in dumpViewHierarchyWithProperties.
Parameters | |
---|---|
className: String |
The className of the view to find |
hashCode: Int |
The hashCode of the view to find |
Returns | |
---|---|
View |
the View to capture from, or null if not found |