sasq64 / droidsound

Android music player
http://swimsuitboys.com/droidsound/
23 stars 11 forks source link

Defaults from preferences.xml file didn't work for new app installs #12

Open alankila opened 13 years ago

alankila commented 13 years ago

I think inserting this call into PlayerActivity's onCreate() will fix it:

PreferenceManager.setDefaultValues(this, R.layout.preferences, false);

The reason the current code didn't work was that the SharedPreferences object is empty initially, because the preferences are in the XML file. This moves them into the SharedPreferences without overwriting user settings (the last "false" in there). I have committed a change to my repository that seems to fix this, and sets VICE as default with "fast (no cycle skipping)" resampling.

alankila commented 13 years ago

Correction: res/layout, not res/xml.