I'm building a soft keyboard, and I can't figure out how to properly build a preferences screen that shows up in the system settings.
I've built the elements screen in xml (preferences.xml), I've populated the options (just a simple ListPreference to select the desired language). That's all fine.
When launching the keyboard (View onCreate InputView()...) I've set things up to write the default preferences to shared preferences:
PreferenceManager.setDefaultValues(getBaseContext(), R.xml.preferences, true);
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
I've also set up a shared preferences listener to determine whether any changes are made to the preferences so I can update the dictionary:
SharedPreferences.OnSharedPreferenceChangeListener listener = new SharedPreferences.OnSharedPreferenceChangeListener() {
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
// do stuff
}
};
SP.registerOnSharedPreferenceChangeListener(listener);
All of this seems to be fine. But I can't for the life of me figure out how to get the preferences screen to show up in the system settings (Settings -> Language and Input -> Keyboard and Input Preferences) so I can actually CHANGE anything. All the other keyboards have a slot here that open up into preference screens where settings can be adjusted. My keyboard name has its own slot, but nothing happens if I touch it. How do I get my preferences screen to be accessible through here?