Debug
public class Debug
Utilities useful for debugging
Summary
Public constructors |
|---|
Debug() |
Public methods |
|
|---|---|
static void |
dumpLayoutParams(ViewGroup layout, String str) |
static void |
dumpLayoutParams(ViewGroup.LayoutParams param, String str) |
static void |
|
static String |
getActionType(MotionEvent event)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 |
getLoc()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 |
This provides return the name of a view |
static String |
This returns the name of a view given its id |
static String |
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 |
This logs n elements in the stack |
static void |
printStack(String msg, int n)This logs n elements in the stack |
Public constructors
Public methods
dumpLayoutParams
public static void dumpLayoutParams(ViewGroup.LayoutParams param, String str)
| Parameters | |
|---|---|
ViewGroup.LayoutParams param |
|
String str |
getActionType
public static String getActionType(MotionEvent event)
Convert a motion event action to a string
| Parameters | |
|---|---|
MotionEvent event |
| Returns | |
|---|---|
String |
getCallFrom
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
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
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
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
public static String getName(View view)
This provides return the name of a view
| Parameters | |
|---|---|
View view |
| Returns | |
|---|---|
String |
name of view |
getName
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
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
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
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
public static void logStack(String tag, String msg, int n)
This logs n elements in the stack
printStack
public static void printStack(String msg, int n)
This logs n elements in the stack
| Parameters | |
|---|---|
String msg |
|
int n |