content: package android.support.clanalyst;
  
  import androidx.appcompat.app.AppCompatActivity;
  import androidx.constraintlayout.widget.ConstraintLayout;
  
  import android.os.Bundle;
  import android.view.View;
  import android.view.ViewGroup;
  
  import java.util.ArrayList;
  
  public class MainActivity extends AppCompatActivity {
      private static final String TAG = "MAIN";
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          ConstraintLayout cl = findConstraintLayout(this);
          if (cl != null) {
              cl.postDelayed( ()->{DumpCL.log(TAG,cl);},2000);
          }
      }
  
      static ConstraintLayout findConstraintLayout(AppCompatActivity activity) {
          ViewGroup group = ((ViewGroup) activity.findViewById(android.R.id.content).getRootView());
          ArrayList<ViewGroup> groups = new ArrayList<>();
          groups.add(group);
          while (!groups.isEmpty()) {
              ViewGroup vg = groups.remove(0);
              int n = vg.getChildCount();
              for (int i = 0; i < n; i++) {
                  View view = vg.getChildAt(i);
                  if (view instanceof ConstraintLayout) {
                      return (ConstraintLayout) view;
                  }
                  if (view instanceof ViewGroup) {
                      groups.add((ViewGroup) view);
                  }
              }
          }
          return null;
      }
  }
  