Modifier and Type | Class and Description |
---|---|
static interface |
ViewDebug.CapturedViewProperty
This annotation can be used to mark fields and methods to be dumped when
the view is captured.
|
static interface |
ViewDebug.ExportedProperty
This annotation can be used to mark fields and methods to be dumped by
the view server.
|
static interface |
ViewDebug.FlagToString
Defines a mapping from a flag to a String.
|
static interface |
ViewDebug.HierarchyHandler
Allows a View to inject custom children into HierarchyViewer.
|
static class |
ViewDebug.HierarchyTraceType
Deprecated.
This enum is now unused
|
static interface |
ViewDebug.IntToString
Defines a mapping from an int value to a String.
|
static class |
ViewDebug.RecyclerTraceType
Deprecated.
This enum is now unused
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG_DRAG
Enables detailed logging of drag/drop operations.
|
static boolean |
DEBUG_POSITIONING
Enables detailed logging of task positioning operations.
|
static boolean |
TRACE_HIERARCHY
Deprecated.
This flag is now unused
|
static boolean |
TRACE_RECYCLER
Deprecated.
This flag is now unused
|
Constructor and Description |
---|
ViewDebug() |
Modifier and Type | Method and Description |
---|---|
static void |
capture(View root,
OutputStream clientStream,
View captureView) |
static void |
captureLayers(View root,
DataOutputStream clientStream) |
static void |
dump(View root,
boolean skipChildren,
boolean includeProperties,
OutputStream clientStream)
Deprecated.
See
dumpv2(View, ByteArrayOutputStream) below. |
static void |
dumpCapturedView(String tag,
Object view)
Dump view info for id based instrument test generation
(and possibly further data analysis).
|
static void |
dumpTheme(View view,
OutputStream clientStream)
Dumps the theme attributes from the given View.
|
static void |
dumpv2(View view,
ByteArrayOutputStream out)
Dumps the view hierarchy starting from the given view.
|
static View |
findView(View root,
String parameter) |
static long |
getViewInstanceCount()
Returns the number of instanciated Views.
|
static long |
getViewRootImplCount()
Returns the number of instanciated ViewAncestors.
|
static Object |
invokeViewMethod(View view,
Method method,
Object[] args)
Invoke a particular method on given view.
|
static void |
outputDisplayList(View root,
View target) |
static void |
profileViewAndChildren(View view,
BufferedWriter out) |
static void |
setLayoutParameter(View view,
String param,
int value) |
static void |
startHierarchyTracing(String prefix,
View view)
Deprecated.
This method is now unused and invoking it is a no-op
|
static void |
startRecyclerTracing(String prefix,
View view)
Deprecated.
This method is now unused and invoking it is a no-op
|
static void |
stopHierarchyTracing()
Deprecated.
This method is now unused and invoking it is a no-op
|
static void |
stopRecyclerTracing()
Deprecated.
This method is now unused and invoking it is a no-op
|
static void |
trace(View view,
ViewDebug.HierarchyTraceType type)
Deprecated.
This method is now unused and invoking it is a no-op
|
static void |
trace(View view,
ViewDebug.RecyclerTraceType type,
int... parameters)
Deprecated.
This method is now unused and invoking it is a no-op
|
@Deprecated public static final boolean TRACE_HIERARCHY
@Deprecated public static final boolean TRACE_RECYCLER
public static final boolean DEBUG_DRAG
public static final boolean DEBUG_POSITIONING
public static long getViewInstanceCount()
public static long getViewRootImplCount()
@Deprecated public static void trace(View view, ViewDebug.RecyclerTraceType type, int... parameters)
@Deprecated public static void startRecyclerTracing(String prefix, View view)
@Deprecated public static void stopRecyclerTracing()
@Deprecated public static void trace(View view, ViewDebug.HierarchyTraceType type)
@Deprecated public static void startHierarchyTracing(String prefix, View view)
@Deprecated public static void stopHierarchyTracing()
public static void profileViewAndChildren(View view, BufferedWriter out) throws IOException
IOException
public static void captureLayers(View root, DataOutputStream clientStream) throws IOException
IOException
public static void capture(View root, OutputStream clientStream, View captureView) throws IOException
IOException
public static void dump(View root, boolean skipChildren, boolean includeProperties, OutputStream clientStream) throws IOException
dumpv2(View, ByteArrayOutputStream)
below.IOException
public static void dumpv2(View view, ByteArrayOutputStream out) throws InterruptedException
InterruptedException
public static void dumpTheme(View view, OutputStream clientStream) throws IOException
IOException
public static void dumpCapturedView(String tag, Object view)
tag
- for logview
- for dumppublic static Object invokeViewMethod(View view, Method method, Object[] args)
Exception
- if the method invocation caused any exceptionpublic static void setLayoutParameter(View view, String param, int value) throws NoSuchFieldException, IllegalAccessException