title: Android SwitchPreferences change together in PreferenceActivity
body: <p>I'm using SwitchPreference in my Android app and found something so weird. There is more than one SwitchPreference in the preference.</p>
  
  <p>When I use the default layout of PreferenceActivity, everything works so well. But after I set custom layout to the preference activity, those Switches begin change together when you click any of them. I'm testing it on a arm-based tablet. Also I test it on my Android phone, It works just so the same.</p>
  
  <p>How does it happens!</p>
  
  <p>Here is my custom layout (<code>setting.xml</code>) for preference:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  
          &lt;Button
              android:id="@+id/button1"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Button" /&gt;
  
          &lt;Button
              android:id="@+id/button2"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text="Button" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;ListView
          android:id="@android:id/list"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
      &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and the PreferenceScreen</p>
  
  <pre><code>&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;SwitchPreference
          android:key="switch1"
          android:summary="This is switch 1"
          android:title="Switch 1" /&gt;
      &lt;SwitchPreference
          android:key="switch2"
          android:summary="This is switch 2"
          android:title="Switch 2" /&gt;
  &lt;/PreferenceScreen&gt;
  </code></pre>
  
  <p>In the code, I just set the custom layout</p>
  
  <pre><code>public class SettingsActivity extends PreferenceActivity {
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.setting);
      }
  
      @Override
      protected void onPostCreate(Bundle savedInstanceState) {
          super.onPostCreate(savedInstanceState);
  
          setupSimplePreferencesScreen();
      }
  
      private void setupSimplePreferencesScreen() {
          addPreferencesFromResource(R.xml.pref_general);
      }
  }
  </code></pre>
  
  <p>Here is the screenshot of the preference, and the two switch always change at the same time what ever you click each of them.
  <img src="https://i.stack.imgur.com/v2Igs.png" alt="The screenshot of the preference"></p>