title: Android: OnClickListener for PreferenceCategory
body: <p>Is it possible to have an <code>OnClickListener</code> for a <code>PreferenceCategory</code> in a <code>PreferenceFragment</code>?</p>
  <p>I have tried things like this:</p>
  <p><strong>XML</strong></p>
  <pre><code>&lt;PreferenceCategory android:title=&quot;Nothing to see here folks&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:clickable=&quot;true&quot;
      android:focusable=&quot;true&quot;
      android:key=&quot;prefCatKey&quot;&gt;
  
          &lt;SwitchPreference
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:key=&quot;randomKey&quot;
              android:title=&quot;Don't do anything&quot; /&gt;
  
  &lt;/PreferenceCategory&gt;
  </code></pre>
  <p><strong>Java</strong></p>
  <pre><code>PreferenceCategory prefCat = (PreferenceCategory)getPreferenceScreen().findPreference(&quot;RTXOffsetCategory&quot;);
  prefCat.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
  {
      @Override
      public boolean onPreferenceClick(Preference preference)
      {
          Log.d(&quot;Tag&quot;, &quot;Do stuff here&quot;);
          return false;
      }
  });
  </code></pre>
  <p>The variable <code>prefCat</code> comes back with a correct value, but the <code>OnPreferenceClickListener()</code> is never called.</p>
  <p>Is it even possible to make a <code>PreferenceCategory</code> call a listener?</p>
  <p>If it is possible, how do you do it?</p>