|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.ViewDebug
public class ViewDebug
Various debugging/tracing tools related to View and the view hierarchy.
| Nested Class Summary | |
|---|---|
static interface |
ViewDebug.ExportedProperty
This annotation can be used to mark fields and methods to be dumped by the view server. |
static class |
ViewDebug.HierarchyTraceType
Defines the type of hierarhcy trace to output to the hierarchy traces file. |
static interface |
ViewDebug.IntToString
Defines a mapping from an int value to a String. |
static class |
ViewDebug.RecyclerTraceType
Defines the type of recycler trace to output to the recycler traces file. |
| Field Summary | |
|---|---|
static boolean |
TRACE_HIERARCHY
Enables or disables view hierarchy tracing. |
static boolean |
TRACE_RECYCLER
Enables or disables view recycler tracing. |
| Constructor Summary | |
|---|---|
ViewDebug()
|
|
| Method Summary | |
|---|---|
(package private) static void |
dispatchCommand(View view,
String command,
String parameters,
OutputStream clientStream)
|
static long |
getViewInstanceCount()
Returns the number of instanciated Views. |
static long |
getViewRootInstanceCount()
Returns the number of instanciated ViewRoots. |
static void |
startHierarchyTracing(String prefix,
View view)
Starts tracing the view hierarchy of the specified view. |
static void |
startRecyclerTracing(String prefix,
View view)
Starts tracing the view recycler of the specified view. |
static void |
stopHierarchyTracing()
Stops the current view hierarchy tracing. |
static void |
stopRecyclerTracing()
Stops the current view recycer tracing. |
static void |
trace(View view,
ViewDebug.HierarchyTraceType type)
Outputs a trace to the currently opened traces file. |
static void |
trace(View view,
ViewDebug.RecyclerTraceType type,
int... parameters)
Outputs a trace to the currently opened recycler traces. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean TRACE_HIERARCHY
trace(View, android.view.ViewDebug.HierarchyTraceType) should first
check that this value is set to true as not to affect performance.
public static final boolean TRACE_RECYCLER
trace(View, android.view.ViewDebug.RecyclerTraceType, int[]) should first
check that this value is set to true as not to affect performance.
| Constructor Detail |
|---|
public ViewDebug()
| Method Detail |
|---|
public static long getViewInstanceCount()
public static long getViewRootInstanceCount()
public static void trace(View view,
ViewDebug.RecyclerTraceType type,
int... parameters)
view - the view to tracetype - the type of the traceparameters - parameters depending on the type of the trace
public static void startRecyclerTracing(String prefix,
View view)
/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.
prefix - the traces files name prefixview - the view whose recycler must be tracedstopRecyclerTracing(),
trace(View, android.view.ViewDebug.RecyclerTraceType, int[])public static void stopRecyclerTracing()
/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.
startRecyclerTracing(String, View),
trace(View, android.view.ViewDebug.RecyclerTraceType, int[])
public static void trace(View view,
ViewDebug.HierarchyTraceType type)
view - the view to tracetype - the type of the trace
public static void startHierarchyTracing(String prefix,
View view)
/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.
prefix - the traces files name prefixview - the view whose hierarchy must be tracedstopHierarchyTracing(),
trace(View, android.view.ViewDebug.HierarchyTraceType)public static void stopHierarchyTracing()
/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.
startHierarchyTracing(String, View),
trace(View, android.view.ViewDebug.HierarchyTraceType)
static void dispatchCommand(View view,
String command,
String parameters,
OutputStream clientStream)
throws IOException
IOException
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||