Back to project page MagicViews.
The source code is released under:
Apache License
If you think the Android project MagicViews listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ivankocijan.TestApp; /*from w w w . j a v a 2 s .c o m*/ import android.os.Bundle; import android.preference.PreferenceFragment; /** * Created by ivankocijan on 22.05.2014.. */ public class ExamplePreferenceFragment extends PreferenceFragment { private static ExamplePreferenceFragment preferenceFragment; public static ExamplePreferenceFragment getInstance () { if (preferenceFragment == null) { synchronized (ExamplePreferenceFragment.class) { if (preferenceFragment == null) { preferenceFragment = new ExamplePreferenceFragment(); } } } return preferenceFragment; } @Override public void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.example_preference); } }