public final class

HumanReadables

extends Object
java.lang.Object
   ↳ android.support.test.espresso.util.HumanReadables

Class Overview

Text converters for various Android objects.

Summary

Public Methods
static String describe(View v)
Transforms an arbitrary view into a string with (hopefully) enough debug info.
static String describe(Cursor c)
static String getViewHierarchyErrorMessage(View rootView, List<View> problemViews, String errorHeader, String problemViewSuffix)
Prints out an error message feature the view hierarchy starting at the rootView.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static String describe (View v)

Transforms an arbitrary view into a string with (hopefully) enough debug info.

Parameters
v nullable view
Returns
  • a string for human consumption.

public static String describe (Cursor c)

public static String getViewHierarchyErrorMessage (View rootView, List<View> problemViews, String errorHeader, String problemViewSuffix)

Prints out an error message feature the view hierarchy starting at the rootView.

Parameters
rootView the root of the hierarchy tree to print out.
problemViews list of the views that you would like to point out are causing the error message or null, if you want to skip this feature.
errorHeader the header of the error message (should contain the description of why the error is happening).
problemViewSuffix the message to append to the view description in the tree printout. Required if problemViews is supplied. Otherwise, null is acceptable.
Returns
  • a string for human consumption.