Let\'s imagine we are developing compound component based on LinearLayout. So, we create class like this:
public class SomeView extends LinearLayout {
public
There is a new parentTag tools attribute (added in Android Studio 2.2) that you can use to specify the layout type for a merge tag, which will make the layout render correctly in the layout editor preview.
So using your example:
Note: Both android:layout_width
and android:layout_height
must be specified in order for the layout to display properly in the editor.