DefaultSharedPreferences settings for the entire application in a separate class
<p>tell me - I want to make reading DefaultSharedPreferences settings in a separate class. and already with other Activity read data from it (in any Activity data is read but want to implement it by a separate class that does not read them every once in each Activity).
Code - Main.java</p>

<pre><code>public class Main extends Activity{

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Test t = new Test();

    String z = t.getAa();
    Toast.makeText(Main.this, z, Toast.LENGTH_LONG).show();
    }

 }
</code></pre>

<p>Code - Test.java</p>

<pre><code>public class Test extends PreferenceActivity {

private String aa;
private String EdittextListPreferenceFont;

public String getAa() {
            addPreferencesFromResource(R.xml.preferences);

    SharedPreferences prefs = PreferenceManager
            .getDefaultSharedPreferences(getBaseContext());

    EdittextListPreferenceFont = prefs.getString("edittext_font",
            getString(R.string.font_default));
            aa = EdittextListPreferenceFont;
    return aa;
}

}
</code></pre>

<p>LogCat eclipse</p>

<pre><code>12-29 19:16:13.016: E/AndroidRuntime(5804): FATAL EXCEPTION: main
12-29 19:16:13.016: E/AndroidRuntime(5804): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.game.invasion/com.game.invasion.Main}: java.lang.RuntimeException: This should be called after super.onCreate.
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.os.Looper.loop(Looper.java:130)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.ActivityThread.main(ActivityThread.java:3835)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at java.lang.reflect.Method.invokeNative(Native Method)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at java.lang.reflect.Method.invoke(Method.java:507)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at dalvik.system.NativeStart.main(Native Method)
12-29 19:16:13.016: E/AndroidRuntime(5804): Caused by: java.lang.RuntimeException: This should be called after super.onCreate.
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.preference.PreferenceActivity.requirePreferenceManager(PreferenceActivity.java:212)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:260)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at com.game.invasion.Test.getAa(Test.java:19)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at com.game.invasion.Main.onCreate(Main.java:45)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-29 19:16:13.016: E/AndroidRuntime(5804):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
</code></pre>

<p>I will be grateful for the help or a link where to read about it.
PS - sorry, google translate</p>
