java.lang.Object | |
↳ | android.view.ViewDebug |
Various debugging/tracing tools related to View and the view hierarchy.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ViewDebug.CapturedViewProperty | This annotation can be used to mark fields and methods to be dumped when the view is captured. | ||||||||||
ViewDebug.ExportedProperty | This annotation can be used to mark fields and methods to be dumped by the view server. | ||||||||||
ViewDebug.HierarchyTraceType | Defines the type of hierarhcy trace to output to the hierarchy traces file. | ||||||||||
ViewDebug.IntToString | Defines a mapping from an int value to a String. | ||||||||||
ViewDebug.RecyclerTraceType | Defines the type of recycler trace to output to the recycler traces file. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | TRACE_HIERARCHY | Enables or disables view hierarchy tracing. | |||||||||
boolean | TRACE_RECYCLER | Enables or disables view recycler tracing. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Dump view info for id based instrument test generation
(and possibly further data analysis).
| |||||||||||
Starts tracing the view hierarchy of the specified view.
| |||||||||||
Starts tracing the view recycler of the specified view.
| |||||||||||
Stops the current view hierarchy tracing.
| |||||||||||
Stops the current view recycer tracing.
| |||||||||||
Outputs a trace to the currently opened recycler traces.
| |||||||||||
Outputs a trace to the currently opened traces file.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Enables or disables view hierarchy tracing. Any invoker of trace(View, android.view.ViewDebug.HierarchyTraceType) should first check that this value is set to true as not to affect performance.
Enables or disables view recycler tracing. Any invoker of trace(View, android.view.ViewDebug.RecyclerTraceType, int[]) should first check that this value is set to true as not to affect performance.
Dump view info for id based instrument test generation (and possibly further data analysis). The results are dumped to the log.
tag | for log |
---|---|
view | for dump |
Starts tracing the view hierarchy of the specified view. The trace is identified by a prefix,
used to build the traces files names: /EXTERNAL/view-hierarchy/PREFIX.traces
and
/EXTERNAL/view-hierarchy/PREFIX.tree
.
Only one view hierarchy can be traced at the same time. After calling this method, any
other invocation will result in a IllegalStateException
unless
stopHierarchyTracing() is invoked before.
Calling this method creates the file /EXTERNAL/view-hierarchy/PREFIX.traces
containing all the traces (or method calls) relative to the specified view's hierarchy.
This method will return immediately if TRACE_HIERARCHY is false.
prefix | the traces files name prefix |
---|---|
view | the view whose hierarchy must be traced |
Starts tracing the view recycler of the specified view. The trace is identified by a prefix,
used to build the traces files names: /EXTERNAL/view-recycler/PREFIX.traces
and
/EXTERNAL/view-recycler/PREFIX.recycler
.
Only one view recycler can be traced at the same time. After calling this method, any
other invocation will result in a IllegalStateException
unless
stopRecyclerTracing() is invoked before.
Traces files are created only after stopRecyclerTracing() is invoked.
This method will return immediately if TRACE_RECYCLER is false.
prefix | the traces files name prefix |
---|---|
view | the view whose recycler must be traced |
Stops the current view hierarchy tracing. This method closes the file
/EXTERNAL/view-hierarchy/PREFIX.traces
.
Calling this method creates the file /EXTERNAL/view-hierarchy/PREFIX.tree
containing the view hierarchy of the view supplied to
startHierarchyTracing(String, View).
This method will return immediately if TRACE_HIERARCHY is false.
Stops the current view recycer tracing.
Calling this method creates the file /EXTERNAL/view-recycler/PREFIX.traces
containing all the traces (or method calls) relative to the specified view's recycler.
Calling this method creates the file /EXTERNAL/view-recycler/PREFIX.recycler
containing all of the views used by the recycler of the view supplied to
startRecyclerTracing(String, View).
This method will return immediately if TRACE_RECYCLER is false.
Outputs a trace to the currently opened recycler traces. The trace records the type of recycler action performed on the supplied view as well as a number of parameters.
view | the view to trace |
---|---|
type | the type of the trace |
parameters | parameters depending on the type of the trace |
Outputs a trace to the currently opened traces file. The trace contains the class name and instance's hashcode of the specified view as well as the supplied trace type.
view | the view to trace |
---|---|
type | the type of the trace |