title: Android: Cannot get a clickable ListView header/footer
body: <p>I'm trying to set a header and footer in my list view that are clickable buttons. The problem is that the OnClickListener isn't responding to anything and I can't figure out what I'm doing wrong.</p>
  
  <pre><code>$   View header = getLayoutInflater().inflate(R.layout.header_layout, null, true);
      getListView().addHeaderView(header);
  
      myAdapter = new myAdapter(this);
  
      header.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              // Do what I want when i click it
          }
      });
  </code></pre>
  
  <p><strong>Update</strong><br>
  The best solution I ultimately came up with was adding a separate button to the header layout, and then doing it like this:</p>
  
  <pre><code>View header = getLayoutInflater().inflate(R.layout.header_layout, null);
  Button headerButton = (Button)header.findViewById(R.id.header_button);
  getListView().addHeaderView(header);
  
  headerButton.setOnClickListener(new View.OnClickListener() {
       @Override
       public void onClick(View v) {
       // My Click Stuff
       }
  });
  </code></pre>