title: findViewByID returns null
body: <p>First of all: yes, I read all the other threads on this topic. And not only those from this site... (you see, I'm a little frustrated)</p>
  
  <p>Most of them come with the advice to use <code>android:id</code> instead of just <code>id</code> in the XML file. I did.</p>
  
  <p>From others, I learned, that <code>View.findViewById</code> works different than <code>Activity.findViewById</code>. I handled that, too.</p>
  
  <p>In my <code>location_layout.xml</code>, I use:</p>
  
  <pre><code>&lt;FrameLayout .... &gt;
      &lt;some.package.MyCustomView ... /&gt;
  
      &lt;LinearLayout ... &gt;
          &lt;TextView ...
              android:id="@+id/txtLat" /&gt;
          ...
      &lt;/LinearLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>In my Activity I do:</p>
  
  <pre><code>...
  setContentView( R.layout.location_layout );
  </code></pre>
  
  <p>and in my custom view class:</p>
  
  <pre><code>... 
  TextView tv = (TextView) findViewById( R.id.txtLat );
  </code></pre>
  
  <p>which returns <code>null</code>. <strong>Doing this, my Activity works fine.</strong> So maybe it's because of the <code>Activity.findViewById</code> and <code>View.findViewById</code> differences. So I stored the context passed to the customs view constructor locally and tried:</p>
  
  <pre><code>...
  TextView tv = (TextView) ((Activity) context).findViewById( R.id.txtLat );
  </code></pre>
  
  <p>which also returned <code>null</code>.</p>
  
  <p>Then, I changed my custom view to extend <code>ViewGroup</code> instead <code>View</code> and changed the <code>location_layout.xml</code> to let the <code>TextView</code> be a direct child of my custom view, so that the <code>View.findViewById</code> should work as supposed. Suprise: it didn't solve anything.</p>
  
  <p>So what the heck am I doing wrong? </p>
  
  <p>I'll appreciate any comments.</p>