Android: Cast View to View
<p>I have a class that extends View (MyView extends View)</p>

<p>In Activity I have next:</p>

<pre><code>    View view = (View)findViewById(R.id.relative_layout_view);

    //here I have error because of cast
    MyView myView = view;
</code></pre>

<p>Why its asked me to add cast ?</p>

<p>P.S: I added cast and app is crashes.</p>
