title: Create a custom View/ViewGroup class in Anko DSL
body: <p>I want to create a custom View which is just a wrapper of some Android Views. I looked into creating a custom ViewGroup which manages the layout of it's child views, but I don't need such complexity. What I basically want to do is something like:</p>
  
  <pre><code>class MainActivity
  verticalLayout {
    textView {
      text = "Something that comes above the swipe"
    }
    swipeLayout {
    }
  }
  
  class SwipeLayout
  linearLayout {
    textView {
      text = "Some text"
    }
    textView {
      text = "Another text"
    }
  }
  </code></pre>
  
  <p>The reason is that I'd like to move the SwipeLayout code into a separate file but don't want to do any complex layout stuff myself. Is this possible using Anko?</p>
  
  <p>Edit: As suggested, <a href="https://stackoverflow.com/questions/40076956/is-it-possible-to-reuse-a-layout-in-kotlin-anko/40078650#40078650">Is it possible to reuse a layout in Kotlin Anko</a> solves this problem if the view is a root layout. But as shown in the example, I'd like to include this within another layout. Is that possible?</p>