title: Should I include my custom component's root element in the accompanying layout file when inflating and using <merge>?
body: <p>Currently I have this custom component (just the outline for brevity) that inflates its associated layout file:</p>
  
  <pre><code>import androidx.constraintlayout.widget.ConstraintLayout;
  
  public class MyComponent extends ConstraintLayout {
  
    public MyComponent(Context context, AttributeSet attrs) {
      super(context, attrs);
  
      LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      inflater.inflate(R.layout.my_component, this);
    }
  }
  </code></pre>
  
  <p>This is the currently associated layout file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;merge xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;TextView
          android:id="@+id/valueMainText"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          /&gt;
      &lt;TextView
          android:id="@+id/valueSubText"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          /&gt;
      &lt;TextView
          android:id="@+id/unitText"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          /&gt;
  &lt;/merge&gt;
  </code></pre>
  
  <p>Is my understanding correct that, when placed inside <code>activity_main.xml</code>, the final view hierarchy in that case will be:</p>
  
  <pre><code>- SomeLayout (MainActivity)
    - ConstraintLayout (MyComponent)
      - TextView
      - TextView
      - TextView
  </code></pre>
  
  <p>...or will I need to include my custom component's root element in the layout file as well, with something like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;merge xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
        &lt;TextView
            android:id="@+id/valueMainText"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            /&gt;
        &lt;TextView
            android:id="@+id/valueSubText"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            /&gt;
        &lt;TextView
            android:id="@+id/unitText"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            /&gt;
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  &lt;/merge&gt;
  </code></pre>
  
  <p>...to achieve this?</p>