Creating my own view type from a layout file?
<p>I defined a layout like this:</p>

<pre><code>&lt;LinearLayout&gt;
  &lt;ListView /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>and I want to use a wrapper class for it:</p>

<pre><code>public class MyView extends LinearLayout {
    ListView mListView;

    public build() {
        mListView = (ListView)findViewById(R.id.mylistview);
    }
}
</code></pre>

<p>not sure how to inflate this from my layout file:</p>

<pre><code>MyView v = LayoutInflater.from(this).inflate(R.layout.myview, null);
</code></pre>

<p>the inflater of course does not know what 'MyView' type is, and returns only View. What's a good way to reconcile this?</p>

<p>Thanks</p>
