public class Debug


Utilities useful for debugging

Summary

Public constructors

Public methods

static void
static void
static void
static String

Convert a motion event action to a string

static String
getCallFrom(int n)

Get file name and location where this method is called.

static String

Get file name and location where this method is called.

static String

Get file name and location where this method is called.

static String

Get file name and location where this method is called.

static String
getName(View view)

This provides return the name of a view

static String
getName(Context context, int[] id)

This returns the name of a view given its id

static String
getName(Context context, int id)

This returns the name of a view given its id

static String
getState(MotionLayout layout, int stateId)

convert an id number to an id String useful in debugging

static String
getState(MotionLayout layout, int stateId, int len)

convert an id number to an id String useful in debugging

static void
logStack(String tag, String msg, int n)

This logs n elements in the stack

static void
printStack(String msg, int n)

This logs n elements in the stack

Public constructors

Debug

Added in 2.2.0-alpha13
public Debug()

Public methods

dumpLayoutParams

Added in 2.2.0-alpha13
public static void dumpLayoutParams(ViewGroup layout, String str)
Parameters
ViewGroup layout
String str

dumpLayoutParams

Added in 2.2.0-alpha13
public static void dumpLayoutParams(ViewGroup.LayoutParams param, String str)
Parameters
ViewGroup.LayoutParams param
String str

dumpPoc

Added in 2.2.0-alpha13
public static void dumpPoc(Object obj)
Parameters
Object obj

getActionType

Added in 2.2.0-alpha13
public static String getActionType(MotionEvent event)

Convert a motion event action to a string

Parameters
MotionEvent event
Returns
String

getCallFrom

Added in 2.2.0-alpha13
public static String getCallFrom(int n)

Get file name and location where this method is called. Formatting it such that it is clickable by Intellij

Returns
String

(filename : line_no)

getLoc

Added in 2.2.0-alpha13
public static String getLoc()

Get file name and location where this method is called. Formatting it such that it is clickable by Intellij

Returns
String

(filename : line_no)

getLocation

Added in 2.2.0-alpha13
public static String getLocation()

Get file name and location where this method is called. Formatting it such that it is clickable by Intellij

Returns
String

(filename : line_no)

getLocation2

Added in 2.2.0-alpha13
public static String getLocation2()

Get file name and location where this method is called. Formatting it such that it is clickable by Intellij

Returns
String

(filename : line_no)

getName

Added in 2.2.0-alpha13
public static String getName(View view)

This provides return the name of a view

Parameters
View view
Returns
String

name of view

getName

Added in 2.2.0-alpha13
public static String getName(Context context, int[] id)

This returns the name of a view given its id

Parameters
Context context
int[] id
Returns
String

name of view

getName

Added in 2.2.0-alpha13
public static String getName(Context context, int id)

This returns the name of a view given its id

Parameters
Context context
int id
Returns
String

name of view

getState

Added in 2.2.0-alpha13
public static String getState(MotionLayout layout, int stateId)

convert an id number to an id String useful in debugging

Parameters
MotionLayout layout
int stateId
Returns
String

getState

Added in 2.2.0-alpha13
public static String getState(MotionLayout layout, int stateId, int len)

convert an id number to an id String useful in debugging

Parameters
MotionLayout layout
int stateId
int len

trim if string >len

Returns
String

logStack

Added in 2.2.0-alpha13
public static void logStack(String tag, String msg, int n)

This logs n elements in the stack

Parameters
String tag
String msg
int n

printStack

Added in 2.2.0-alpha13
public static void printStack(String msg, int n)

This logs n elements in the stack

Parameters
String msg
int n