I eventually fixed it by just calling a new Intent that launches the Preference screen.
Quite a simple fix, but it works fine.
Prefs.java
Code:
public class ReaderPreferences extends PreferenceActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// --load the preferences from an XML file---
addPreferencesFromResource(R.xml.preference);
}
In my main screen when pressing a button:
Code:
Intent i = new Intent(this, Prefs.class);
startActivity(i);
That's all. After setting the preferences simply press the back button and you're done.
Dont forget to add Prefs to your Manifest!