getSharedPreferences not returning a value
<p>I've placed a preferences file 'xml/sleeppreferences.xml' into a tabSpec, with the idea that that is the preferences for that part of the app and there will be other preference files for other parts.</p>

<p>This seems to work ok. I make a preference change, close the emulator, re-run the app, go back to the preference page, and the preference is what I had set it to.</p>

<p>But when I click to another tab, where I want to use the value of that preference, it all goes wrong.</p>

<p>I've looked high and low, but cannot find an answer.</p>

<p>This is an excerpt of the code:</p>

<pre><code>public static final String PREF_FILE_NAME = "sleeppreferences";
:
:
:
SharedPreferences prefs = getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE);        
String test=prefs.getString("editTextPref", "unset");
</code></pre>

<p>with "unset" being the default response if it doesn't find anything. </p>

<p>It always returns "unset"</p>

<p>As I say, I've looked all over, and the code I'm using seems to be the correct code. So what's going on?</p>

<p>Thanks</p>

<p>Dave</p>
