android.view
public
class
android.view.ViewDebug
Various debugging/tracing tools related to View and the view hierarchy.
Nested Classes
Summary
Constants
|
|
|
Value |
|
boolean |
TRACE_HIERARCHY |
Enables or disables view hierarchy tracing. |
false |
boolean |
TRACE_RECYCLER |
Enables or disables view recycler tracing. |
false |
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
public
static
final
boolean
TRACE_HIERARCHY
public
static
final
boolean
TRACE_RECYCLER
Public Constructors
Public Methods
public
static
void
startHierarchyTracing(String prefix, View view)
Starts tracing the view hierarchy of the specified view. The trace is identified by a prefix,
used to build the traces files names:
/tmp/view-hierarchy/PREFIX.traces
and
/tmp/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
/tmp/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.
Parameters
prefix
| the traces files name prefix |
view
| the view whose hierarchy must be traced |
public
static
void
startRecyclerTracing(String prefix, View view)
Starts tracing the view recycler of the specified view. The trace is identified by a prefix,
used to build the traces files names:
/tmp/view-recycler/PREFIX.traces
and
/tmp/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.
Parameters
prefix
| the traces files name prefix |
view
| the view whose recycler must be traced |
public
static
void
stopHierarchyTracing()
Stops the current view hierarchy tracing. This method closes the file
/tmp/view-hierarchy/PREFIX.traces
.
Calling this method creates the file
/tmp/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.
public
static
void
stopRecyclerTracing()
Stops the current view recycer tracing.
Calling this method creates the file
/tmp/view-recycler/PREFIX.traces
containing all the traces (or method calls) relative to the specified view's recycler.
Calling this method creates the file
/tmp/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.
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.
Parameters
view
| the view to trace |
type
| the type of the trace
|