English | Site Directory

Android - An Open Handset Alliance Project

android.view
public class

android.view.ViewDebug

java.lang.Object
android.view.ViewDebug

Various debugging/tracing tools related to View and the view hierarchy.

Summary

Public Constructors

          ViewDebug()

Public Methods

      static  void  startHierarchyTracing(String prefix, View view)
Starts tracing the view hierarchy of the specified view.
      static  void  stopHierarchyTracing()
Stops the current view hierarchy tracing.
Methods inherited from class java.lang.Object

Details

Public Constructors

public ViewDebug()

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 is false.

Parameters

prefix the traces files name prefix
view the view whose hierarchy 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 is false.
Build m5-rc15g - 14 May 2008 12:50