title: Preview layout with merge root tag in Intellij IDEA/Android Studio
body: <p>Let's imagine we are developing compound component based on LinearLayout. So, we create class like this:</p>
  
  <pre><code>public class SomeView extends LinearLayout {
      public SomeView(Context context, AttributeSet attrs) {
          super(context, attrs);
  
          setOrientation(LinearLayout.VERTICAL);
          View.inflate(context, R.layout.somelayout, this);
      }
  }
  </code></pre>
  
  <p>If we'll use <code>LinearLayout</code> as a root of <code>somelayout.xml</code>, we'll have extra view level, so we use merge tag:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;merge xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Some text"
          android:textSize="20sp"/&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Some other text"/&gt;
  &lt;/merge&gt;
  </code></pre>
  
  <p>But in Preview tab in IDE merge always acts as FrameLayout, and we'll see something like that:
  <img src="https://i.stack.imgur.com/V9wpb.png" alt="Preview with merge"></p>
  
  <p>(It is Android Studio, Intellij IDEA is just the same, about Eclipse I don't know)</p>
  
  <p>Preview speed up developing layouts a lot, it's sad lose such a great help even for some layouts. May be there is a way to specify, how Preview should interpret <code>merge</code> tag in particular layout?</p>