title: onClickListener on a LinearLayout
body: <p>Got a little problem with a functionality I'd like to implement.</p>
  
  <p>I've got a <code>LinearLayout</code>, containing 2 <code>TextViews</code>. I'd want to set a <code>onClickListener</code> on it, so that it would behave just like an item in a <code>ListView</code>.</p>
  
  <p>I've tried some possible implementation of this, and got it working using the xml attribute <code>android:onClick</code> of the <code>LinearLayout</code>.</p>
  
  <p>As I want the application to visually react to a click on the <code>LinearLayout</code> (as in a <code>ListView</code>), I put this in the listener callback method :</p>
  
  <pre><code>l.setBackgroundColor(android.R.drawable.list_selector_background);
  </code></pre>
  
  <p>l is a <code>LinearLayout</code> object, initialised with <code>findViewById()</code>;</p>
  
  <p>I get an application not responding whenever I try to click on the layout. I tried to replace the code in the callback method by a Toast message show up, and it works, so I guess the problem is in the <code>setBackgroundColor</code>.</p>
  
  <p><em>Is anyone familiar with this?</em></p>
  
  <p>PS: sorry, I can't post more code right now, I'm at work.</p>