Neither constructor nor onFinishInflate called for custom view
<p>I have a custom view (which extends GLSurfaceView) I'm trying to use in my app. The xml layout that uses it appears to be being loaded correctly (attributes I set for the view are applied), but neither the view's constructor nor the onFinishInflate method are being called for the class.  I should also add that I'm new to the android platform so this is probably a stupid mistake.</p>

<p>Here is my main.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
</code></pre>

<p></p>

<pre><code>#&lt;!-- Status Bar --&gt;
&lt;LinearLayout 
    android:orientation="horizontal"
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"
    android:layout_weight="0"
    android:background="@drawable/status_bkg"&gt;

    #&lt;!-- Location label --&gt;
    &lt;TextView 
        android:text="Location" 
        android:textColor="#FFFFFF"
        android:layout_weight="1" 
        android:layout_width="match_parent"
        android:layout_height="wrap_content" /&gt;

    #&lt;!-- Date/Time label --&gt;
    &lt;TextView 
        android:text="Date and Time" 
        android:textColor="#FFFFFF"
        android:layout_weight="1" 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="right"  /&gt;
&lt;/LinearLayout&gt;

#&lt;!-- ChartView --&gt;
&lt;View class="com.xxx.yyy.ChartView" android:id="@+id/chartView"
    android:layout_width="match_parent" 
    android:layout_height="match_parent"
    android:background="#00FF00" 
    android:layout_weight="1"&gt;
&lt;/View&gt;
</code></pre>

<p></p>

<p>The ChartView is the custom GLSurfaceView.  This layout is loaded and the ChartView has a green background as specified. However, none of my setup (in code) happens for it.  I've tried placing it in the two constructors and in the onFinishInflate methods, but they inexplicably don't get called.  I've verified that the class name is correct (the xxx.yyy are just to hide the company in this post.</p>

<p>I've also tried a different form of the xml reference</p>

<pre><code>    &lt;com.xxx.yyy.ChartView android:id="@+id/chartView"
    android:layout_width="match_parent" 
    android:layout_height="match_parent"
    android:background="#00FF00" 
    android:layout_weight="1"/&gt;
</code></pre>

<p>But this dies when loading the Activity says that the constructor </p>

<p>ChartView(Context context, AttributeSet attrs)</p>

<p>doesn't exist (although it is certainly in my code).</p>

<p>Anyone got any tips on what could be going on?</p>
