package com.levien.synthesizer.android.ui;

import android.os.Bundle;
import android.preference.PreferenceActivity;

import com.levien.synthesizer.R;

public class SettingsActivity extends PreferenceActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.preferences);
  }
}


@@ -63,16 +63,161 @@
 Bundle;%0A
+import android.preference.ListPreference;%0Aimport android.preference.Preference;%0Aimport android.preference.Preference.OnPreferenceChangeListener;%0A
 import a
@@ -254,16 +254,16 @@
 tivity;%0A
-
 %0Aimport 
@@ -348,16 +348,51 @@
 ivity %7B%0A
+  @SuppressWarnings(%22deprecation%22)%0A
   @Overr
@@ -487,16 +487,16 @@
 State);%0A
-
     addP
@@ -538,15 +538,627 @@
 ences);%0A
+    ListPreference keyboardTypePref = (ListPreference)findPreference(%22keyboard_type%22);%0A    updateListSummary(keyboardTypePref, keyboardTypePref.getValue());%0A    keyboardTypePref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() %7B%0A      public boolean onPreferenceChange(Preference pref, Object newVal) %7B%0A        updateListSummary(pref, newVal.toString());%0A        return true;%0A      %7D%0A    %7D);%0A  %7D%0A%0A  private void updateListSummary(Preference pref, String newVal) %7B%0A    ListPreference lp = (ListPreference)pref;%0A    int index = lp.findIndexOfValue(newVal);%0A    lp.setSummary(lp.getEntries()%5Bindex%5D);%0A
   %7D%0A%7D%0A%0A

Make keyboard type show up in preferences list