title: Clickable LinearLayout in Android
body: <p>I want to use LinearLayout as a button, actually I have:</p>
  
  <pre><code>LinearLayout Ll;
  Ll = (LinearLayout) findViewById(R.id.MYID);
  Ll.setClickable(true);
  Ll.setOnClickListener(new View.OnClickListener(){
      @Override
      public void onClick(View view) {
          //action
      }
  });
  </code></pre>
  
  <p>But it doesn't work. When I try to open this activity, it gives a warning:</p>
  
  <blockquote>
    <p>Unfortunately, app has stopped</p>
  </blockquote>
  
  <p>Click should close the activity and back to main. In "//action", I use <code>finish()</code> but there is the same problem.</p>