public static int getViewLeft(View view) {
    if (Build.VERSION.SDK_INT >= 11) {
      return view.getLeft() + (int) view.getTranslationX();
    }
    return view.getLeft();
  }
Dumps information about a layout hierarchy into a JSON object
core/src/main/java/com/facebook/testing/screenshot/layouthierarchy/LayoutHierarchyDumper.java